I18n structure cakephp and locales

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:

And when I change the language I got this code:
$locales = [
‘en’ => ‘en_us’,
‘fr’ => ‘fr_fr’,
‘ca’ => ‘es_ca’,
‘es’ => ‘es_es’
$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:

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:

In my AppController::initialize i have theese lines. Instead of session you should use cookies

$lang = $this->request->session()->read('layout.lang');
if ($lang) {

I don’t know if there are more automatic/effective methods.

As i know, locale should be en_us | fr_fr ?
And folder should be src/Locale/{locale}/ (no /bin)