Title: Fatal error: Uncaught Error: Undefined constant &#8220;ICL_LANGUAGE_CODE
Last modified: March 7, 2025

---

# Fatal error: Uncaught Error: Undefined constant “ICL_LANGUAGE_CODE

 *  Resolved [richardthai](https://wordpress.org/support/users/richardthai/)
 * (@richardthai)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-undefined-constant-icl_language_code/)
 * The Falang plugin was always working well and now on my websites it starting 
   throwing and error:
   Fatal error: Uncaught Error: Undefined constant “ICL_LANGUAGE_CODEWhen
   I disable the Falang plugin the site works as normal.What could be the problem
   now and suggestions of how to fix?

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [sbouey](https://wordpress.org/support/users/sbouey/)
 * (@sbouey)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-undefined-constant-icl_language_code/#post-18347720)
 * What are the languages you are using ? you have this in backend or front-end ?
 *  Plugin Author [sbouey](https://wordpress.org/support/users/sbouey/)
 * (@sbouey)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-undefined-constant-icl_language_code/#post-18347722)
 * you says on my websites ? you have this on several sites ?
 *  Plugin Author [sbouey](https://wordpress.org/support/users/sbouey/)
 * (@sbouey)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-undefined-constant-icl_language_code/#post-18347736)
 * When i look on google ICL_LANGUAGE_CODE is a WPML problem
 * Falang read the wpml-config.xml file to translate string perhaps it’s the problem
 *  Thread Starter [richardthai](https://wordpress.org/support/users/richardthai/)
 * (@richardthai)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-undefined-constant-icl_language_code/#post-18349404)
 * I have a couple of real estate websites. One uses the Houzez theme and the other
   uses Residence wordpress theme. Both were working well with your plugin for a
   long time. I only have your plugin installed and never used WPML. The theme developers
   may have put code in the script to make it compatible with WPML. 
   The error code
   pointed to this below in the theme script:
 *      if (function_exists(‘icl_translate’)) {
 *                     if (ICL_LANGUAGE_CODE != ‘en’) {
 *                         $handle = “bootstrap-datepicker.” . ICL_LANGUAGE_CODE;
 *                         $name = “bootstrap-datepicker.” . ICL_LANGUAGE_CODE .“.
   min.js”;
 *                         wp_enqueue_script($handle, HOUZEZ_JS_DIR_URI . ‘vendors/
   locales/’ . $name, array(‘jquery’), ‘1.0’, true);
 *                     }
 *                     $houzez_date_language = ICL_LANGUAGE_CODE;
 *                 }
 *             }
 *  Thread Starter [richardthai](https://wordpress.org/support/users/richardthai/)
 * (@richardthai)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-undefined-constant-icl_language_code/#post-18349410)
 * I have 2 real estate websites and one uses the Houzez theme and the other Residence
   wordpress real estate theme. They both were working for a long time and then 
   one of the updates made them start with errors. I only use your language plugin
   and never installed WPML. I think maybe the theme developers added code to make
   the themes compatible with the WPML plugin and that may be causing the problems.
   
   Here is a link to a page that throws the error: [https://thailandluxuryhomes.com/property/luxury-condominium-for-sale-north-hua-hin-cha-am/](https://thailandluxuryhomes.com/property/luxury-condominium-for-sale-north-hua-hin-cha-am/)
 *  Thread Starter [richardthai](https://wordpress.org/support/users/richardthai/)
 * (@richardthai)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-undefined-constant-icl_language_code/#post-18349411)
 * Here is some of the code that the error points to:
    $handle = “bootstrap-datepicker.”.
   ICL_LANGUAGE_CODE;
 *                         $name = “bootstrap-datepicker.” . ICL_LANGUAGE_CODE .“.
   min.js”;
 *                         wp_enqueue_script($handle, HOUZEZ_JS_DIR_URI . ‘vendors/
   locales/’ . $name, array(‘jquery’), ‘1.0’, true)
 *                     $houzez_date_language = ICL_LANGUAGE_CODE;
 *  Plugin Author [sbouey](https://wordpress.org/support/users/sbouey/)
 * (@sbouey)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-undefined-constant-icl_language_code/#post-18350123)
 * The theme houzez is a free theme ? to test it locally
 *  Thread Starter [richardthai](https://wordpress.org/support/users/richardthai/)
 * (@richardthai)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-undefined-constant-icl_language_code/#post-18350346)
 * The theme is a paid theme from Themeforest I purchased from there several years
   ago. They have done many updates and added functions to be compatible with WPML
   from what I saw in the changelog. That probably created the problem with your
   plugin as it always worked perfectly.
 *  Thread Starter [richardthai](https://wordpress.org/support/users/richardthai/)
 * (@richardthai)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-undefined-constant-icl_language_code/#post-18350433)
 * I removed the code the theme developer added for the WPML option and now your
   plugin works good again. The problem was due to the theme developer adding code
   just for the use of the WPML plugin. So everything is resolved and working again
   until possibly another theme update. I plan to keep using your good plugin as
   it works very well.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Fatal error: Uncaught Error: Undefined constant “ICL_LANGUAGE_CODE’ is
closed to new replies.

 * ![](https://ps.w.org/falang/assets/icon-256x256.png?rev=2351566)
 * [Falang multilanguage for WordPress](https://wordpress.org/plugins/falang/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/falang/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/falang/)
 * [Active Topics](https://wordpress.org/support/plugin/falang/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/falang/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/falang/reviews/)

 * 9 replies
 * 2 participants
 * Last reply from: [richardthai](https://wordpress.org/support/users/richardthai/)
 * Last activity: [1 year, 2 months ago](https://wordpress.org/support/topic/fatal-error-uncaught-error-undefined-constant-icl_language_code/#post-18350433)
 * Status: resolved