Yii v2 snippet guide III

Comparing #10 with #11

Revision #11 was created by rackycz rackycz on Jan 21, 2021, 2:35:09 PM.

Translations

Content

[...]
['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;
[...]