|
|
|
@ -356,7 +356,8 @@ class Module extends \yii\base\Module
|
|
|
|
|
} |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
In the example above we are using wildcard for matching and then filtering each category per needed file. |
|
|
|
|
In the example above we are using wildcard for matching and then filtering each category per needed file. Instead of using `fileMap` you can simply |
|
|
|
|
use convention of category mapping to the same named file and use `Module::t('validation')` or `Module::t('form)` directly. |
|
|
|
|
|
|
|
|
|
###Translating widgets messages |
|
|
|
|
|
|
|
|
@ -405,6 +406,8 @@ class Menu extends Widget
|
|
|
|
|
} |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
Instead of using `fileMap` you can simply use convention of category mapping to the same named file and use `Menu::t('messages')` directly. |
|
|
|
|
|
|
|
|
|
> **Note**: For widgets you also can use i18n views, same rules as for controllers are applied to them too. |
|
|
|
|
|
|
|
|
|
TBD: provided classes overview. |
|
|
|
|