shoxabbos/yii2-langselect

Langugae selector

Maintainers

Package info

github.com/Shoxabbos/yii2-langselect

Issues

Type:yii2-extension

pkg:composer/shoxabbos/yii2-langselect

Statistics

Installs: 8

Dependents: 0

Suggesters: 0

Stars: 0

v1.0 2017-08-17 08:47 UTC

This package is not auto-updated.

Last update: 2026-03-01 11:13:02 UTC


README

Langugae selector

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist shoxabbos/yii2-langselect "*"

or add

"shoxabbos/yii2-langselect": "*"

to the require section of your composer.json file.

Usage

Add this Bootstrap Class to your web/config.php file:

'bootstrap' => [
    [
        'class' => '\shoxabbos\langselect\LanguageSelector',
        'supportedLanguages' => ['en', 'ru'],
    ],
],

To change the language of the site, You need to call URL with a "lang" parameter:

http://localhost/site/index?lang=en
http://localhost/site/index?lang=ru