yarisrespect/yii2-i18n

Auto generation of language files for Yii 2 framework

Installs: 148

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 1

Type:yii2-extension

v1.0 2015-10-16 15:50 UTC

This package is not auto-updated.

Last update: 2020-09-04 20:38:59 UTC


README

This extension is adding all translations into their language files automaticaly.

php composer.phar require yarisrespect/yii2-i18n "dev-master"

Just configure your translation compoent like this:

'i18n' => [
        'class' => \yarisrespect\i18n\I18N::className(),
        'translations' => [
            'app*' => [
                'class' => 'yii\i18n\PhpMessageSource',
                'basePath' => '@app/messages',
                'fileMap' => [
                    'app' => 'app.php',
                    'app/error' => 'error.php',
                ],
            ],
        ],
        'autoGenerate' => YII_DEBUG,
    ],