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
Requires
- yiisoft/yii2: ^2.0.4
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' ] ]; }