Revision #78 has been created by rackycz on Sep 20, 2019, 3:21:43 PM with the memo:
« previous (#77) next (#79) »
Yii v2 for beginners
As you can see when the language is changed, redirection to site/index happens. Also mind that we are not modifying the attribute from config/web.php using Yii::$app->language, but we are saving the value into the session. The reason is that PHP deletes memory after every click, only session is kept. We then can use the value in other controllers and views
Yii::$app->language = Yii::$app->session->get('langID');
... text ...