Revision #5                                    has been created by  olafure                                    on Jun 23, 2009, 9:55:36 AM with the memo:
 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**[...]