Hi there,
I’m trying to configure a selector language for my page and I think that I’m doing all ok, but the text does not translate as I expect.
I’m following the documentation:
https://book.cakephp.org/3.0/en/core-libraries/internationalization-and-localization.html
And when I change the language I got this code:
$locales = [
‘en’ => ‘en_us’,
‘fr’ => ‘fr_fr’,
‘ca’ => ‘es_ca’,
‘es’ => ‘es_es’
];
I18n::locale($locales[$parts[1]]);
$this->Cookie->write(‘Config.language’, $parts[1],false, ‘20 days’);
Where parts[1] is the language selected after the domain.
Test page: www.uncuentoparacadadia.com
Structure of locale:
/bin/src/Locale/{locale}/default.po
/bin/src/Locale/{locale}/default.mo
where locale is for example fr | es | en
The image is changing (so locale is working when I change the language) but the text indented by __() no. How Can I solve that?? Thank you: