soap/yii2-language-switcher

Yii language switcher to be used with codemix/yii2-localeurls

v1.0.0 2021-07-11 18:31 UTC

README

Latest Stable Version Total Downloads Latest Unstable Version License composer.lock

Yii2 language switcher to use with codemix/yii2-localeurls.

Thanks to lajax/yii2-language-picker for some code/assets and inspiration.

Installation

Install through composer is the preferable way.

composer require soap/yii2-language-switcher

How to use

First you have to make setting for codemix/yii2-localeurls. Please refer to his document. Then put the widget in your layout.

<?= \soap\LanguageSwitcher\widgets\LanguageSwitcher::widget([
    'skin' => \soap\LanguageSwitcher\widgets\LanguageSwitcher::SKIN_DROPDOWN,
    'size' => \soap\LanguageSwitcher\widgets\LanguageSwitcher::SIZE_SMALL
]);