I search for a variable that outputs the currently used language of the polylang plugin. Something like:
if($curlang == "en") { ... }
We can use the get_locale function:
get_locale
if (get_locale() == 'en_GB') { // drink tea }
1.4m articles
1.4m replys
5 comments
57.0k users