PHP code example of devnullius / yii2-i18n-module

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

    

devnullius / yii2-i18n-module example snippets


'i18n' => [
	'class' => devnullius\yii\modules\i18n\components\I18N::class,
	'languages' => ['ru-RU', 'de-DE', 'it-IT']
],

'modules' => [
	'i18n' => devnullius\yii\modules\i18n\Module::class
],

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

php composer.phar 

php yii migrate --migrationPath=@devnullius/yii/modules/i18n/migrations

php yii i18n/export @devnullius/yii/modules/i18n/messages i18n

php yii i18n/import @yii/messages