diff options
Diffstat (limited to 'tmpl.py')
-rw-r--r-- | tmpl.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -19,6 +19,7 @@ def do_translate(text): if type(transl) == unicode: return transl return transl.decode('utf-8') +_ = do_translate def select_language(): if cherrypy.thread_data.lang != None: lang = cherrypy.thread_data.lang @@ -55,7 +56,7 @@ def render(*args, **kwargs): template = cherrypy.thread_data.template #ctxt = Context(url = cherrypy.url) - ctxt = Context(url = myurl, lang = cherrypy.thread_data.lang) + ctxt = Context(url = myurl, lang = cherrypy.thread_data.lang, _ = do_translate) ctxt.push(kwargs) return template.generate(ctxt) |