Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #2335: setup_i18n.diff

File setup_i18n.diff, 1.0 KB (added by TimurIzhbulatov, 3 years ago)

Patch for tg/i18n.py

  • tg/i18n.py

     
    2727            log.info("Language %s found in session", 
    2828                         pylons.session[lang_session_key]) 
    2929             
    30             try: 
    31                 pylons.i18n.set_lang(pylons.session[lang_session_key]) 
    32             except LanguageError: 
    33                 log.info("Language %s: not supported", 
    34                          pylons.session[lang_session_key]) 
    35             else: 
    36                 # if there is a resource bundle for this language 
    37                 # stop the best match search 
    38                 use_session_lang = True 
    39                 log.info("Set request language to %s", 
    40                          pylons.session[lang_session_key]) 
     30            set_temporary_lang([pylons.session[lang_session_key], ]) 
     31            # if there is a resource bundle for this language 
     32            # stop the best match search 
     33            use_session_lang = True 
    4134         
    4235 
    4336    if languages: