Difference between #4 and #5 of
Setting and maintaining the language in Application (i18n)

Revision #5 has been created by olafure on Jun 23, 2009, 9:55:36 AM with the memo:

Explained how to use MyController instead of Controller
« previous (#4) next (#6) »

Changes

Title unchanged

Setting and maintaining the language in Application (i18n)

Category unchanged

Tutorials

Yii version unchanged

Tags unchanged

Content changed

As seen in [this](http://www.yiiframework.com/forum/index.php/topic,1034.msg5968.html#msg5968) post, Yii doesn't enforce how language is set and maintained within the session. According to that post, the preferred method is to create a base controller which implements code for maintaining the language state. That Controller is then used in your code instead of CControler. (by defing your classes with "class ... extends *MyController*")

Here's my method of implementing this idea:

**components/MyController.php**
[...]
19 0
29 followers
Viewed: 124 668 times
Version: 1.1
Category: Tutorials
Written by: olafure
Last updated by: Yang He
Created on: Apr 5, 2009
Last updated: 11 years ago
Update Article

Revisions

View all history