I have implemented a site with several languages just as described in the tutorial. But when trying to display text using the _t() function it always is displayed in the default locale language (spanish). I managed to get as far as finding out that this happens because _t() gets the locale from i18n::get_locale() and this function for some reason always returns the default language.
Just for testing I made a function in my Page.php that returns a string with the values of:
- i18n::get_locale()
- $this->Locale
And Bingo! On the english version of the page the first function returns es_ES while the second value is en_GB. On the spanish version both return es_ES.
Is this normal? Am I missing something? Can _t() not be used this way?