Skip to content

mardoc/yii2-language-select

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yii2 Language Select widget.

Supported languages (ISO 639-1)

and some i18n-locales languages

Support Codes: cs, cs-CZ, da, da-DK, de, de-DE, en, us, en-GB, en-US, gb, es, fi, fi-FI, fr, fr-FR, hu, hu-HU, id, id-ID, is, is-IS, it, it-IT, ja, ja-JP, lt, lt-LT, lv, ms, ms-MY, my, nl, nl-NL, no, nn-NO, pl, pl-PL, pt, pt-PT, ro, ro-RO, ru, ru-RU, sv, sv, sv-SE, th, th-TH, uk, uk-UA, vi, zh, zh-CN.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require  mardoc/yii2-language-select "*"

or add

"mardoc/yii2-language-select": "*"

to the require section of your composer.json file.

Basic usage

Single column example

For example you want to have an ability of entering several emails of user on profile page. In this case you can use yii2-multiple-input widget like in the following code

use mardoc\LanguageSelect;
...
<?php
    echo  LanguageSelect::widget([
            'languages' => [
                'uk'=>'Ua',
                'en'=>'En',
                'de-DE'=>'De',
                'lt-LT'=>'Lt',
                'es'=>'Es'
            ],
            'languageParam'=>'language'
        ]);
?>

License

MIT

About

Widget language select

Resources

License

Stars

Watchers

Forks

Packages

No packages published