Boostrap Dropmenu select languages

This widget helps set only url. To management languages, I recommend codemix/yii2-localeurls

Installation

composer require pceuropa/yii2-language-selection-widget

Configuration


use pceuropa\languageSelection\LanguageSelection;

LanguageSelection::widget([
	'language' => ['pl', 'en', 'fr', 'nl', 'de'],
	'languageParam' => 'language',
	'container' => 'div', // li for navbar, div for sidebar or footer example
	'classContainer' =>  'dropdown-toggle' // btn btn-default dropdown-toggle
])

use pceuropa\languageSelection\LanguageSelection;

LanguageSelection::widget([
	'language' => ['pl', 'en', 'en-us', 'nl', 'de'],
	'languageParam' => 'language',
	'container' => 'div', // li for navbar, div for sidebar or footer example
	'classContainer' =>  'btn btn-default dropdown-toggle' // btn btn-default dropdown-toggle
])