#2255: Language support in session lacking
------------------------+---------------------------------------------------
 Reporter:  aigarius    |        Owner:  jon     
     Type:  defect      |       Status:  assigned
 Priority:  normal      |    Milestone:  2.0rc1  
Component:  TurboGears  |      Version:  2.0b7   
 Severity:  normal      |   Resolution:          
 Keywords:  i18n        |  
------------------------+---------------------------------------------------
Comment (by jon):

 Tentative fix in [6489].
 Still to do : create tests and docs for this i18n.py.

 To make use of it, import set_lang from tg.i18n, and add this in your root
 controller :

 {{{
     @expose()
     def set_lang(self, previous_url, lang):
         """set the desired language in the session and
         redirect to the previous url

         @param previous_url: the url the visit is coming from
         @type previous_url: string

         @param lang: the desired locale of type: 'en', or such
         @type lang: string
         """
         set_lang(lang)
         redirect(previous_url)
 }}}

-- 
Ticket URL: <http://trac.turbogears.org/ticket/2255#comment:5>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to