Revision #11 has been created by rackycz on Jan 21, 2021, 2:35:09 PM with the memo:
Translations
« previous (#10) next (#12) »
Changes
Title
unchanged
Yii v2 snippet guide III
Category
unchanged
Tutorials
Yii version
unchanged
2.0
Tags
unchanged
Content
changed
[...]
['label' => 'English', 'url' => \yii\helpers\Url::current(['sys_lang' => 'en']) ],
],
]
```
Now we need to process the new GET parameter "sys_lang" and save it to Session in order to keep the new language. Best is to create a BaseController which will be extended by all controllers. Its content looks like this:
```php
<?php
namespace app\controllers;
use yii\web\Controller;[...]