Ñò ˆ_‚Jc @s®ddkZddkZddkZddkZddklZlZlZddklZlZei e ƒZ d„Z d„Z d„Zd„Zdd d d d gZdS( iÿÿÿÿN(t add_fallbackt LanguageErrortget_lang(tconfigtsessioncCs‡tioPtiitiddƒƒ}|o!t|tƒo |g}qVq`g}ng}|itiii ƒƒt |ƒdS(sSet languages from the request header and the session. The session language(s) take priority over the request languages. Automatically called by tg controllers to setup i18n. Should only be manually called if you override controllers function. tlang_session_keyttg_langN( tpylonsRtgetRt isinstancet basestringtextendtrequesttaccept_languaget best_matchestset_temporary_lang(t languages((s+/usr/lib/python2.6/site-packages/tg/i18n.pyt setup_i18n s   c Cs’ytii|ƒWn#tj otid|ƒnXtid|ƒyt|ƒWn#tj otid|ƒnXtid|ƒdS(sØSet the current language(s) used for translations without touching the session language. languages should be a string or a list of strings. First lang will be used as main lang, others as fallbacks. sLanguage %s: not supportedsSet request language to %ss(Language %s: not supported by FormEncodes)Set request language for FormEncode to %sN(Rti18ntset_langRtlogtinfotset_formencode_translation(R((s+/usr/lib/python2.6/site-packages/tg/i18n.pyR#scKs<t|ƒtio$|ttiddƒs