Support » Plugin: Waiting: One-click countdowns » Waiting plugin and polylang plugin

  • Hi there,

    I’m using polylang plugin for my site. I need to manage 2 languages : french and English.
    I’m using Waiting plugin.

    I need to have the labels of days, hours, minutes, … in french and English.

    So I tried to modify the translateTerms() function to do that.

    But I don’t know how to get the language selected.

    I tried to test the ICL_LANGUAGE_CODE, but it’s alway blank ?

    Any idea to do that ?

    Thanks for your help.


Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author


    Hi, did you see this post?

    The WordPress function get_locale() will have the language code, did you try it?

    Hi, thx for your answer.

    Yes, I tried this, but the get_locale() always returns fr_FR even when I switch to the English language.

    I also tried to use the pll_current_language() polylang function, but in this case I have the following error :
    Fatal error: Uncaught Error: Call to undefined function pll_current_language()

    Plugin Author


    I’m not familiar with that plugin, do you know what function or constant of that plugin contains the currently used language? Take a quick look at its documentation. pll_current_language is not since it’s generating an error.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Waiting plugin and polylang plugin’ is closed to new replies.