fonclub/i18n

Yii2 DB i18n module

Maintainers

Details

github.com/fonclub/i18n

Source

Issues

Installs: 9

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

dev-master 2015-03-24 13:20 UTC

This package is auto-updated.

Last update: 2024-10-23 02:51:34 UTC


README

Модуль для хранения локализации в БД

Установка

Запустить
php composer.phar require --prefer-dist "fonclub/i18n" "dev-master"

или добавить в composer.json:

"fonclub/i18n": "dev-master"
Используем модуль

<?php
    ......
    'modules' => [
        'i18n' => [
            'class' => 'fonclub\i18n\Module',
        ],
    ],
    ......
    ......
    'components' => [    
            'i18n' => [
                'translations' => [
                    '*'=> [
                        'class' => 'fonclub\i18n\DbMessageSource',
                        'messageTable'=>'{{%i18n}}',
                        'enableCaching' => true,
                        'cachingDuration' => 3600
                    ],
                ],
            ],
    ......