From 0737539f6f2e75f9da739a0ea3f9179f2b171dca Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Sun, 20 May 2001 03:07:36 +0000 Subject: add_language(): A more convenient interface for mm_cfg.py files for adding local site-wide language support. Get rid of the os.environ hacking and gettext calls; they're no longer necessary. --- Mailman/Defaults.py.in | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Mailman/Defaults.py.in b/Mailman/Defaults.py.in index 338533099..16d856f80 100644 --- a/Mailman/Defaults.py.in +++ b/Mailman/Defaults.py.in @@ -639,13 +639,8 @@ LC_DESCRIPTIONS = {'es': (_("Spanish (Spain)"), 'iso-8859-1'), } del _ -# Set some things up for internationalization. Individual modules still need -# to do a "from Mailman.i18n import _" -import gettext - -os.environ['LANG'] = DEFAULT_SERVER_LANGUAGE -gettext.bindtextdomain('mailman', MESSAGES_DIR) -gettext.textdomain('mailman') +def add_language(code, description, charset): + LC_DESCRIPTIONS[code] = (description, charset) # BAW: Another hack to get Python's site-packages directory on the path. This -- cgit v1.3.1