Commit 3b1c90d6 by Mark

docs added

parent 0e76c894
...@@ -357,7 +357,7 @@ class Module extends \yii\base\Module ...@@ -357,7 +357,7 @@ class Module extends \yii\base\Module
``` ```
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 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. use convention of category mapping to the same named file and use `Module::t('validation', 'your custom validation method')` or `Module::t('form', 'some form label')` directly.
###Translating widgets messages ###Translating widgets messages
...@@ -406,7 +406,7 @@ class Menu extends Widget ...@@ -406,7 +406,7 @@ 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. Instead of using `fileMap` you can simply use convention of category mapping to the same named file and use `Menu::t('messages', 'new messages {messages}', ['{messages}' => 10])` directly.
> **Note**: For widgets you also can use i18n views, same rules as for controllers are applied to them too. > **Note**: For widgets you also can use i18n views, same rules as for controllers are applied to them too.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment