PHP code example of dvixi / yii2-i18n

1. Go to this page and download the library: Download dvixi/yii2-i18n 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/ */

    

dvixi / yii2-i18n example snippets


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

'modules' => [
	'i18n' => dvixi\yii2\I18n\Module::className()
],

'i18n' => [
    'class'=> dvixi\yii2\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 @dvixi/yii2/I18n/messages dvixi/yii2/i18n

php yii i18n/import @yii/messages