I
I
Ilya Beloborodov2017-07-19 09:15:58
Yii
Ilya Beloborodov, 2017-07-19 09:15:58

Why is the translation looking in /messages/en/app.php?

Added to components

'i18n' => [
            'translations' => [
                '*' => [
                    'class' => 'yii\i18n\DbMessageSource',
                    'sourceLanguage' => 'en_US',
                ],
            ],
        ],

but there is an error in the log
The message file for category 'app' does not exist: C:\xampp\htdocs\localhost/messages/ru/app.php

Why? If translations should be pulled from the base

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya Beloborodov, 2017-07-19
@kowap

It had to be like this

'i18n' => [
            'translations' => [
                'app' => [
                    'class' => 'yii\i18n\DbMessageSource',
                    'sourceLanguage' => 'en_US',
                ],
            ],
        ],

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question