From e7c8d8e5893b38d248a99a2bc915737b2a5488fa Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Fri, 2 Mar 2001 00:51:28 +0000 Subject: get_translation(), set_translation(): Function which let you set and restore the translation context (via the global Translations object). --- Mailman/i18n.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Mailman/i18n.py b/Mailman/i18n.py index f2978f986..2dcacadc9 100644 --- a/Mailman/i18n.py +++ b/Mailman/i18n.py @@ -34,6 +34,15 @@ def set_language(language): # untranslated English. _translation = gettext.NullTranslations() + +def get_translation(): + return _translation + +def set_translation(translation): + global _translation + _translation = translation + + def _x(s, frame): # Do translation of the given string into the current language, and do -- cgit v1.3.1