Title: pll_current_language fatal error
Last modified: February 10, 2018

---

# pll_current_language fatal error

 *  [catheg](https://wordpress.org/support/users/catheg/)
 * (@catheg)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/pll_current_language-fatal-error/)
 * Hi there,
 * I’ve tried to use the pll_current_language in a count-down plugin.
 * But I got the message :
    Fatal error: Call to undefined function pll_current_language().
 * Any idea.
 * Thx for your help.
 * Catherine.

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

 *  Thread Starter [catheg](https://wordpress.org/support/users/catheg/)
 * (@catheg)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/pll_current_language-fatal-error/#post-9959859)
 * Other thing, when I use get_locale(), the lamguage code returned doesn’t change
   even when I switch language.
    The language code returned is the language defined
   in the general settings of wordpress.
 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/pll_current_language-fatal-error/#post-9964206)
 * Hi,
 * You are attempting to use the current language before it is defined. See [https://polylang.pro/doc/developpers-how-to/](https://polylang.pro/doc/developpers-how-to/)
   to know when the current language is defined depending on the options.
 *  Thread Starter [catheg](https://wordpress.org/support/users/catheg/)
 * (@catheg)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/pll_current_language-fatal-error/#post-9964357)
 * I’m in the case 2.
 * My language settings, URL modifications is the following :
    The language is set
   from the directory name in pretty permalinks
 * So the language is supposed to be defined.
 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/pll_current_language-fatal-error/#post-9967017)
 * Not if you are attempting to use `pll_current_language()` before the action `
   plugins_loaded` id fired.

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

The topic ‘pll_current_language fatal error’ is closed to new replies.

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

 * 4 replies
 * 2 participants
 * Last reply from: [Chouby](https://wordpress.org/support/users/chouby/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/pll_current_language-fatal-error/#post-9967017)
 * Status: not resolved