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

Revision #67 has been created by rackycz on Sep 20, 2019, 2:22:19 PM with the memo:

edit
« previous (#66) next (#68) »

Changes

Title unchanged

Yii v2 for beginners

Category unchanged

Tutorials

Yii version unchanged

2.0

Tags unchanged

tutorial,beginner,yii2

Content changed

[...]
The idea behind is that in the code ther are used only English texts and if you want to change from English to some other language this file will be used.

Now go to file config/web.php, find section "components" and paste this code:

```php
    'components' => [        'i18n' => [        'translations' => [        '*' => [       'class' => 'yii\i18n\PhpMessageSource',       'basePath' => '@app/messages',       'sourceLanguage' => 'en-US',       'fileMap' => [        'app' => 'app.php',       ],   ],
 
    ],
 
      
],        ], // end of 'i18n'        // ... other configurations     ], // end of 'components'

```

Explanation of the asterisk * can be found in article [https://www.yiiframework.com/doc/guide/2.0/en/tutorial-i18n](https://www.yiiframework.com/doc/guide/2.0/en/tutorial-i18n)
[...]
7 0
4 followers
Viewed: 254 792 times
Version: 2.0
Category: Tutorials
Written by: rackycz
Last updated by: rackycz
Created on: Sep 19, 2019
Last updated: 5 months ago
Update Article

Revisions

View all history