PHP code example of notgosu / yii2-i18n-module

1. Go to this page and download the library: Download notgosu/yii2-i18n-module library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

notgosu / yii2-i18n-module example snippets


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

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

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

php composer.phar 

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

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

php yii i18n/import @yii/messages