Translating framework messages when using a wilcard

I have been reading the docs on internationalization and I read that you can use a wildcard such as:




'i18n' => [

	'translations' => [

		'*' => [

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

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

			//'on missingTranslation' => ['app\components\TranslationEventHandler', 'handleMissingTranslation'],

		],

	],

],

I also read the part about translating framework messages and as I understand these are translated by Yii automatically but you have the option of translating them yourself by doing:




'i18n' => [

	'translations' => [

		'yii' => [

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

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

			//'on missingTranslation' => ['app\components\TranslationEventHandler', 'handleMissingTranslation'],

		],

	],

],

My question is… if I use the wildcard option would Yii still translate the framework stuff automatically or because I used a wilcard would the "yii" stuff fall into it as well and I would need to provide the translations myself!?

Thanks!

I agree, the documents are unclear on this. My understanding was that * in this case is NOT a wildcard but it says if there is a category that does not match anyone of the definitions, use the message source under the “*” rule. If you don’t do this, Yii will throw an error if you use a category that does not exist in a rule.

Well in that case I would have to assume that since the “yii” stuff should already be matched to be done automatically it shouldn’t be caught by the wildcard - that though is just an assumption.

Well it seems I assumed wrong as since I started using the wildcard I am now getting the error:

It’s looking for the language file ‘yii.php’ inside the respective language directory.

Pretty annoying I now have to define a entry for each different category type. :(