yarcode / yii2-i18n-yarcode
Yii2 i18n module to manage project translation
Installs: 511
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 4
Open Issues: 0
Type:yii2-extension
Requires
This package is not auto-updated.
Last update: 2024-11-10 02:56:56 UTC
README
Yii2 i18n(internationalization) module to manage project translation.
This is fork of zelenin/yii2-i18n-module with more useful interface.
##Installation
Composer
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: rlng-krsk@yandex.ru