Почему или как сделать что бы работал перевод?
![5a888d5f5263c544293400.png](https://habrastorage.org/webt/5a/88/8d/5a888d5f5263c544293400.png)
Сейчас у меня так:
Конфиг:'sourceLanguage' => 'en-EN',
'language' => 'ru-RU',
'components' => [
'i18n' => [
'translations' => [
'app*' => [
'class' => 'yii\i18n\PhpMessageSource',
'basePath' => '@app/messages',
'sourceLanguage' => 'en-EN',
'fileMap' => [
'app' => 'app.php',
'app/error' => 'error.php',
],
],
],
],
]
./messages/
└── ru-RU
├── app.php
└── error.php
app.phpreturn [
'First Name' => 'Имя',
'Name' => 'Имя',
'Last Name' => 'Фамилия',
'Middle Name' => 'Отчество',
'Password' => 'Пароль',
'Title' => 'Заголовок',
'Tags ID' => 'Тэги',
'Content' => 'Содержание',
'Body' => 'Содержание',
'Save' => 'Сохранить',
'Send' => 'Отправить',
'Comment' => 'Комментарий'
];
Форма:<? $form = \yii\widgets\ActiveForm::begin(['id' => 'b-contacts__form']) ?>
<?= $form->field($model, 'name')->textInput()->label(Yii::t('app', 'Name')); ?>
<?= $form->field($model, 'email')->textInput(['type' => 'email'])->label(Yii::t('app', 'Email')); ?>
<?= $form->field($model, 'body')->textarea(['rows' => 5])->label(Yii::t('app', 'Content')); ?>
<?= \yii\helpers\Html::submitButton(Yii::t('app', 'Send'), ['class' => 'btn btn-success pull-right']); ?>
<? \yii\widgets\ActiveForm::end(); ?>