i18n\I18N $translations

$translations public property

List of yii\i18n\MessageSource configurations or objects. The array keys are message category patterns, and the array values are the corresponding yii\i18n\MessageSource objects or the configurations for creating the yii\i18n\MessageSource objects.

The message category patterns can contain the wildcard * at the end to match multiple categories with the same prefix. For example, app/* matches both app/cat1 and app/cat2.

The * category pattern will match all categories that do not match any other category patterns.

This property may be modified on the fly by extensions who want to have their own message sources registered under their own namespaces.

The category yii and app are always defined. The former refers to the messages used in the Yii core framework code, while the latter refers to the default message category for custom application code. By default, both of these categories use yii\i18n\PhpMessageSource and the corresponding message files are stored under @yii/messages and @app/messages, respectively.

You may override the configuration of both categories.

public array $translations = null
doc_Yii
2016-10-30 17:06:11
Comments
Leave a Comment

Please login to continue.