2017 © Pedro Peláez
 

yii2-extension yii2-i18n-module

Yii2 i18n (internalization) module makes the translation of your application so simple

image

notgosu/yii2-i18n-module

Yii2 i18n (internalization) module makes the translation of your application so simple

  • Sunday, November 2, 2014
  • by notgosu
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1,046 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 40 Forks
  • 0 Open issues
  • 10 Versions
  • 0 % Grown

The README.md

Yii2 I18N module

Yii2 i18n (internalization) module makes the translation of your application so simple, (*1)

Installation

Composer

The preferred way to install this extension is through Composer., (*2)

Either run, (*3)

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

or add, (*4)

"zelenin/yii2-i18n-module": "dev-master"

to the require section of your composer.json, (*5)

Usage

Configure I18N component in common config:, (*6)

'i18n' => [
    'class' => Zelenin\yii\modules\I18n\components\I18N::className(),
    'languages' => ['ru-RU', 'de-DE', 'it-IT']
],

Configure I18N component in backend config:, (*7)

'modules' => [
    'i18n' => Zelenin\yii\modules\I18n\Module::className()
],

Run:, (*8)

php yii migrate --migrationPath=@Zelenin/yii/modules/I18n/migrations

Go to http://backend.yourdomain.com/translations for translating your messages, (*9)

PHP to DB import

If you have an old project with PHP-based i18n you may migrate to DbSource via console., (*10)

Run:, (*11)

php yii i18n/import @common/messages

where @common/messages is path for app translations, (*12)

DB to PHP export

Run:, (*13)

php yii i18n/export @Zelenin/yii/modules/I18n/messages zelenin/modules/i18n

where @Zelenin/yii/modules/I18n/messages is path for app translations and zelenin/modules/i18n is translations category in DB, (*14)

Using yii category with DB

Import translations from PHP files, (*15)

php yii i18n/import @yii/messages

Configure I18N component:, (*16)

'i18n' => [
    'class'=> Zelenin\yii\modules\I18n\components\I18N::className(),
    'languages' => ['ru-RU', 'de-DE', 'it-IT'],
    'translations' => [
        'yii' => [
            'class' => yii\i18n\DbMessageSource::className()
        ]
    ]
],

Info

Component uses yii\i18n\MissingTranslationEvent for auto-add of missing translations to database, (*17)

See Yii2 i18n guide, (*18)

Author

Aleksandr Zelenin, e-mail: aleksandr@zelenin.me, (*19)

The Versions

02/11 2014

dev-master

9999999-dev https://github.com/notgosu/yii2-i18n-module

Yii2 i18n (internalization) module makes the translation of your application so simple

  Sources   Download

MIT

The Requires

 

by Naumenko Pavel

translations yii2 translation i18n

02/11 2014

0.1.5

0.1.5.0 https://github.com/zelenin/yii2-i18n-module

Yii2 i18n (internalization) module makes the translation of your application so simple

  Sources   Download

MIT

The Requires

 

translations yii2 translation i18n

23/10 2014

0.1.4

0.1.4.0 https://github.com/zelenin/yii2-i18n-module

Yii2 i18n (internalization) module makes the translation of your application so simple

  Sources   Download

MIT

The Requires

 

translations yii2 translation i18n

05/10 2014

0.1.3

0.1.3.0 https://github.com/zelenin/yii2-i18n-module

Yii2 i18n (internalization) module makes the translation of your application so simple

  Sources   Download

MIT

The Requires

 

translations yii2 translation i18n

16/08 2014

0.1.0

0.1.0.0 https://github.com/zelenin/yii2-i18n-module

Yii2 i18n (internalization) module makes the translation of your application so simple

  Sources   Download

MIT

The Requires

 

translations yii2 translation i18n

16/08 2014

0.1.1

0.1.1.0 https://github.com/zelenin/yii2-i18n-module

Yii2 i18n (internalization) module makes the translation of your application so simple

  Sources   Download

MIT

The Requires

 

translations yii2 translation i18n

16/08 2014

0.1.2

0.1.2.0 https://github.com/zelenin/yii2-i18n-module

Yii2 i18n (internalization) module makes the translation of your application so simple

  Sources   Download

MIT

The Requires

 

translations yii2 translation i18n

24/06 2014

0.0.4

0.0.4.0 https://github.com/zelenin/yii2-i18n-module

Yii2 i18n (internalization) module makes the translation of your application so simple

  Sources   Download

MIT

The Requires

 

translations yii2 translation i18n

12/06 2014

0.0.2

0.0.2.0 https://github.com/zelenin/yii2-i18n-module

Yii2 i18n (internalization) module makes the translation of your application so simple

  Sources   Download

MIT

The Requires

 

translations yii2 translation i18n

09/06 2014

0.0.1

0.0.1.0 https://github.com/zelenin/yii2-i18n-module

Yii2 i18n (internalization) module makes the translation of your application so simple

  Sources   Download

MIT

The Requires

 

translations yii2 translation i18n