Answer the question
In order to leave comments, you need to log in
[[+content_image]]
How to translate the validation error message?
Good afternoon, I'm trying to Russify the validation error message:
Модель:
public function rules()
{
return [
...
[['username', 'email'], 'unique', 'message' => Yii::t('app/error', 'User with {value} already exists')],
'User with {value} already exists' => 'Пользователь с {value} уже существует.',
Answer the question
In order to leave comments, you need to log in
Checked. Everything is working. Most likely the matter is in https://www.yiiframework.com/doc/api/2.0/yii-i18n-...
specify in the config
'sourceLanguage' => 'en',
'forceTranslation' => true,
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question