maks757 / yii2-multi-lang
Yii2 url manager with supporting multi languages.
Installs: 47
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 2
Type:yii2-extension
README
INSTALLATION
You can use this migrate language table or yours ActiveRecord model.
yii migrate --migrationPath=@vendor/maks757/yii2-multi-lang/migration
If you use yours ActiveRecord model, please implements from ILanguage interface.
maks757\multilang\components\ILanguage
main.php configure UrlManager
'UrlManager' => [
'class' => 'maks757\multilang\MultiLangUrlManager'
...
]
add to ActiveRecord configure TranslationBehavior
public function behaviors() { return [ 'translation' => [ 'class' => TranslationBehavior::className(), 'translationClass' => ArticleTranslation::className(), 'relationColumn' => 'article_id' ] ]; }