Skip to content

makroxyz/yii2-language-selector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

yii2-language-selector

Component for Yii2 language selector

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist makroxyz/yii2-language-selector "*"

or add

"makroxyz/yii2-language-selector": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply modify your application configuration as follows:

return [
    'bootstrap' => ['lang'],
    'components' => [
        'lang' => 'makroxyz\language\Language',
        // ...
    ],
    ...
];

then you can call

Yii::$app->lang->getMenuItems()

to obtain language dropdown items for use in your yii\widgets\Menu or yii\bootstrap\Nav

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages