Skip to content

cyberz/yii2-language-url

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Yii2 Url Language management

Language mangement for URL's

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist cyberz/yii2-language-url "*"

or add

"cyberz/yii2-language-url": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

1)Apply migartion:

php yii migrate/up --migrationPath=vendor/cyberz/yii2-language-url/language/migrations

2)Setup config:

'components' => [
    'request' => [
        'class' => 'cyberz\language\components\LanguageRequest'
            ...
     'urlManager' => [
                'class'=>'cyberz\language\components\LanguageUrlManager',
            ...

3)Use widget:

<?= \cyberz\language\widgets\Switcher::widget(); ?>

About

Language mangement for URL's

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages