from pylons.i18n import set_lang, add_fallback class BaseController(WSGIController): def __before__(self, action): if 'lang' in session: set_lang(session['lang']) for lang in request.languages: if lang in ['zh', 'en']: add_fallback(lang)
Copyright © 2006 WorldHello 开放文档之源 计划 |