I am trying to get current language code via ICL_LANGUAGE_CODE
in my plugin
but I can't , it's not defined , the result of this
echo "Code: ".ICL_LANGUAGE_CODE;
is
Code: ICL_LANGUAGE_NAME
When I trying the following
global $sitepress;
$current_language = $sitepress->get_current_language();
echo "Code:". $current_language ;
I get the blank screen.
I don't know in which way I can get it.
In the theme functions.php everything works fine. Thanks.