diff options
Diffstat (limited to 'aurweb')
-rw-r--r-- | aurweb/l10n.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/aurweb/l10n.py b/aurweb/l10n.py index 66e0f1c0..a7c0103e 100644 --- a/aurweb/l10n.py +++ b/aurweb/l10n.py @@ -1,8 +1,11 @@ import gettext +import aurweb.config + class Translator: def __init__(self): + self._localedir = aurweb.config.get('options', 'localedir') self._translator = {} def translate(self, s, lang): @@ -10,7 +13,7 @@ class Translator: return s if lang not in self._translator: self._translator[lang] = gettext.translation("aurweb", - "../../web/locale", + self._localedir, languages=[lang]) self._translator[lang].install() return _(s) |