Yii2 i18n(internationalization) module to manage project translation.
This is fork of zelenin/yii2-i18n-module with more useful interface.
##Installation
The preferred way to install this extension is through Composer.
Either run
php composer.phar require yarcode/yii2-i18n-yarcode "dev-master"
or add
"yarcode/yii2-i18n-yarcode": "dev-master"
to the require section of your composer.json
##Usage
Configure i18n component in your config file(for advanced application, use common config)
'components' => [
...,
'i18n' => [
'class' => yarcode\i18n\components\I18N::className(),
'languages' => [
'en-EN' => 'English',
'es-ES' => 'Español',
'ru-RU' => 'Русский',
],
'defaultLanguage' => 'en-EN',
'on missingTranslation' => ['yarcode\i18n\Module', 'missingTranslation']
],
...
]
And connect module at backend application:
'modules' => [
...,
'i18n' => yarcode\i18n\Module::className(),
...
]
Run migration:
php yii migrate --migrationPath=@vendor/yii-dream-team/yii2-i18n-yarcode/src/migrations
Go to http://backend.yourdomain.com/translations
for translating your messages
##Authors
Valentin Konusov, e-mail: [email protected]