Language switcher in Yii2

category:  Yii2.0 framework

Yii version 2.0.13.1 Currently, I am building the custom application with Yii2. I want to add the language switcher in the application. I found some posts that help but these posts won’t explain well. So I try to explain what I did here. Here what we will do: create the static value in config/params.php create a language dropdown list in layout/main.php create a actionLanguage() in the controller create a LanguageSelector component create a JS file for calling the actionLanguage() via … Read More