ayaalkaplin / yii2-multilang
Multilang for Yii2
Package info
github.com/uraankhayayaal/yii2-multilang
Type:yii2-extension
pkg:composer/ayaalkaplin/yii2-multilang
v0.0.5
2019-03-12 01:59 UTC
Requires
- yiisoft/yii2: ~2.0.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Multilang for Yii2
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist ayaalkaplin/yii2-multilang "*"
or add
"ayaalkaplin/yii2-multilang": "*"
to the require section of your composer.json file.
Usage
Be sure that you have lines in urlManager config:
'urlManager' => [ ****** 'enablePrettyUrl' => true, 'showScriptName' => false, ****** ]
Migrate:
php yii migrate --migrationPath=@vendor/ayaalkaplin/yii2-multilang/src/migrations
Once the extension is installed, simply use it in your code by :
<?= \ayaalkaplin\multilang\widgets\lang\Change::widget(); ?>
For backend add this URL
<?= Url::toRoute(['/multilang/back-lang/index']); ?>