2012-09-18, 23:32:51
pier Wrote:I've trouble to obtain current language!
I build the home page from the template in a loop doing different hings and taking elements elsewhere, some are text, some images...
So in the HTML I've different PHP call. In the main one, I need to know the actual selected language to pick elements in the right pages.
I tried variable $language like that:
<?php
...
...
...
global $language;
$curL = $language;
...
...
...
?>
But $curL give me "Array" when I echo it!
Your code should work. But maybe you or a plugin sets $language before?