Commit b499e630 by Mark

docs fixed

parent 806dbf9b
......@@ -289,7 +289,7 @@ Examples
###Translating module messages
If you want to translate messages for module and you dont use one translation file for all messages, you can make it like following:
If you want to translate messages for a module and avoid using a single translation file for all messages, you can make it like the following:
```php
<?php
......@@ -310,8 +310,7 @@ class Module extends \yii\base\Module
public function registerTranslations()
{
$i18n = Yii::$app->i18n;
$i18n->translations['modules/users/*'] = [
Yii::$app->i18n->translations['modules/users/*'] = [
'class' => 'yii\i18n\PhpMessageSource',
'sourceLanguage' => 'en',
'basePath' => '@app/modules/users/messages',
......
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