Setting and maintaining the language in Application (i18n)

Comparing #4 with #5

Revision #5 was created by olafure olafure on Jun 23, 2009, 9:55:36 AM.

Explained how to use MyController instead of Controller

Content

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**
[...]