summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Mailman/Utils.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Mailman/Utils.py b/Mailman/Utils.py
index f25dff557..9594bf7f5 100644
--- a/Mailman/Utils.py
+++ b/Mailman/Utils.py
@@ -491,16 +491,18 @@ class SafeDict(UserDict):
return '<Missing key: %s>' % `key`
-def maketext(templatefile, dict=None, raw=0):
+def maketext(templatefile, dict=None, raw=0, lang=None):
"""Make some text from a template file.
Reads the `templatefile', relative to mm_cfg.TEMPLATE_DIR, does string
substitution by interpolating in the `dict', and if `raw' is false,
wraps/fills the resulting text by calling wrap().
"""
+ if lang is None:
+ lang = mm_cfg.DEFAULT_SERVER_LANGUAGE
if dict is None:
dict = {}
- file = os.path.join(mm_cfg.TEMPLATE_DIR, templatefile)
+ file = os.path.join(mm_cfg.TEMPLATE_DIR, lang, templatefile)
fp = open(file)
template = fp.read()
fp.close()