Difference between #6 and #7 of
How to add a DropDown Language Picker (i18n) to the Menu

Revision #7 has been created by JQL on Nov 24, 2023, 7:46:36 PM with the memo:

Hopefully the last edit to fix formatting
« previous (#6) next (#8) »

Changes

Title unchanged

How to add a DropDown Language Picker to the Menu

Category unchanged

How-tos

Yii version unchanged

2.0

Tags unchanged

i18n,AJAX,bootstrap,internationalization,bootstrap menu

Content changed

[...]
```php
'language' => 'en',
'sourceLanguage' => 'en',
```

Note: you should always use the `'sourceLanguage' => 'en'` as it is, usually, easier and cheaper to translate from English into another language. If the
`sourceLanguage` is not set it defaults to 'en'.

Add the following to the `'components' => [...]` section:
[...]
add:

 
```php
'encodeLabels' => false, // Required to enter HTML into the labels
```

like so:
[...]
1 0
1 follower
Viewed: 58 249 times
Version: 2.0
Category: How-tos
Written by: JQL
Last updated by: JQL
Created on: Nov 24, 2023
Last updated: 5 months ago
Update Article

Revisions

View all history