Difference between #67 and #68 of
Yii v2 snippet guide

Revision #68 has been created by rackycz on Sep 20, 2019, 2:30:08 PM with the memo:

« previous (#67) next (#69) »


Title unchanged

Yii v2 for beginners

Category unchanged


Yii version unchanged


Tags unchanged


Content changed

Now you can open the page for adding a new user and you will see than so far nothing changed :-)

- [http://localhost/basic-/web/index.php?r=user%2Fcreate](http://localhost/basic-/web/index.php?r=user%2Fcreate)

We must change the language ... For now let's do it in a primitive
way. Open the userController, find actionCreate() and paste this code:
Yii::$app->language = "cs-CZ"; // use your language
and permanent way again in file config/web.php
$config = [
    // use your language
    // also accessible via Yii::$app->language
    'language' => 'cs-CZ',
    'sourceLanguage' => 'en-US', // en-US is default value, try not to change it.

Note: This language-setting will be forgotten as soon as you click somewhere. In next chapter we will enhance this ..

Switching languages + session + dropdown in the top menu
2 0
1 follower
Viewed: 10 989 times
Version: 2.0
Category: Tutorials
Written by: rackycz
Last updated by: rackycz
Created on: Sep 19, 2019
Last updated: 25 days ago
Update Article


View all history