Difference between #17 and #18 of
Yii v2 snippet guide III

Revision #18 has been created by rackycz on Jan 21, 2021, 2:50:24 PM with the memo:

Translations
« previous (#17) next (#19) »

Changes

Title unchanged

Yii v2 snippet guide III

Category unchanged

Tutorials

Yii version unchanged

2.0

Tags unchanged

tutorial,yii2,beginer

Content changed

[...]
'<sys_lang:[a-z]{2}>/<controller:\w+>/<action:\w+>' => '<controller>/<action>',
],
],
],
```
Now the language-switching links will produce URL like this: http://myweb.com/en/site/index . Without the rules the link would look like this: http://myweb.com/site/index?sys_lang=en
 . So the rule works in both directions. When URL is parsed and controllers are called, but also when a new URL is created using the URL helper.
8 0
4 followers
Viewed: 164 971 times
Version: 2.0
Category: Tutorials
Written by: rackycz
Last updated by: rackycz
Created on: Jan 21, 2021
Last updated: 9 months ago
Update Article

Revisions

View all history