black-lamp/yii2-multi-lang

Yii2 url manager with supporting multi languages.

Installs: 878

Dependents: 8

Suggesters: 0

Security: 0

Stars: 2

Watchers: 6

Forks: 2

Open Issues: 0

Type:yii2-extension

1.2.2 2017-09-22 08:30 UTC

This package is not auto-updated.

Last update: 2024-10-26 19:00:05 UTC


README

INSTALLATION

Migrate language table

yii migrate --migrationPath=@vendor/black-lamp/yii2-multi-lang/migration

Configure UrlManager

'UrlManager' => [
	'class' => 'bl\multilang\MultiLangUrlManager'
	...
]

Configure TranslationBehavior

    public function behaviors()
    {
        return [
            'translation' => [
                'class' => TranslationBehavior::className(),
                'translationClass' => ArticleTranslation::className(),
                'relationColumn' => 'article_id'
            ]
        ];
    }