Module default language different from application

Hi Everyone!

I have a basic template application with default language ‘en’ and with to different languages ‘en’, ‘es’.

I also have an admin module, but it has to been managed in Spanish, (not English) and I can find the way to translate English core message (yii.php).

I have tried to map yii core messages in ‘i18n’ component, like this:




'i18n' => [

	'translations' => [

		'*' => [

			'class'          => 'yii\i18n\PhpMessageSource',

			'basePath'   	=> '@app/messages',

			'sourceLanguage' => 'en-US',

			'fileMap'        => [

				'yii'  => 'yii.php',

				'app'  => 'app.php',

				'form' => 'form.php',

			],

		],

	],

],



Or set default language in my init module method:





public function init()

{

	parent::init();


	\Yii::configure($this, require __DIR__ . '/config.php');


	$this->setAliases([

		'@adminToolAssets' => __DIR__ . '/assets',

	]);

}



config.php:





return [

		'language'   => 'es',

		'components' => [


		],

		'params' => [


		],

	];



But nothing works, any idea?

Thx in advance