Difference between #2 and #3 of
YII2 : simple language Switcher Widget

Revision #3 has been created by phunsanit on Apr 26, 2015, 6:09:28 PM with the memo:

add configure demo
« previous (#2)

Changes

Title unchanged

YII2 : simple language Switcher Widget

Category unchanged

Tutorials

Yii version unchanged

Tags unchanged

yii2, i18n, international, language, picker

Content changed

[...]
]);
}

}
```
2. open file
**common\config\main.php** add
 
 
```php 
...
 
    'bootstrap' => [
 
...
 
        'languageSwitcher',
 
...
 
    ],
 
...
 
...
 
    'components' => [
 
...
 
        'languageSwitcher' => [
 
            'class' => 'common\components\languageSwitcher',
 
        ],
 
...
 
    ],
 
...
 
```
 
3. open file **
frontend\views\layouts\main.php** - add **use common\components\languageSwitcher;** - include widget in your layout by **<?= languageSwitcher::Widget() ?>** ภาษาไทย [YII 2 Widget เปลี่ยนภาษา](http://plusmagi.com/yii-2-widget-%E0%B9%80%E0%B8%9B%E0%B8%A5%E0%B8%B5%E0%B9%88%E0%B8%A2%E0%B8%99%E0%B8%A0%E0%B8%B2%E0%B8%A9%E0%B8%B2/ "YII 2 Widget เปลี่ยนภาษา ")
1 0
5 followers
Viewed: 31 695 times
Version: 2.0
Category: Tutorials
Written by: phunsanit
Last updated by: phunsanit
Created on: Apr 26, 2015
Last updated: 9 years ago
Update Article

Revisions

View all history