J
J
jekahm2016-07-25 17:53:00
Yii
jekahm, 2016-07-25 17:53:00

How to add another language to the site using the zelenin/yii2-i18n-module?

Good day!
I use zelenin/yii2-i18n-module to translate messages on the site. All messages are stored in the database. And at the moment two languages ​​are used: Russian and English.
There was a need to add another language (Swedish). How can this be implemented so that it is possible to translate messages already in the database?
Current config:

'modules' => [
...
        'i18n' => 'app\modules\translationURL\TranslationModule',
        'translationURL' => [
            'class' => 'app\modules\translationURL\TranslationModule',
        ],
...
'components' => [
        'i18n' => [
            'class' => Zelenin\yii\modules\I18n\components\I18N::className(),
            'missingTranslationHandler' => ['app\modules\translationURL\translationModule', 'missingTranslation'],
            'languages' => ['ru-RU', 'en-EN']
        ],
...

Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Zelenin, 2016-07-26
@jekahm

'languages' => ['ru-RU', 'en-EN', 'se-SE']
So?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question