diff options
Diffstat (limited to 'src/__init__.py')
| -rw-r--r-- | src/__init__.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/__init__.py b/src/__init__.py index 3540b5a..ee83253 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -8,11 +8,13 @@ from os import environ as os_environ import gettext def localeInit(): + """ Prepare settings for gettext usage """ lang = language.getLanguage()[:2] # getLanguage returns e.g. "fi_FI" for "language_country" os_environ["LANGUAGE"] = lang # Enigma doesn't set this (or LC_ALL, LC_MESSAGES, LANG). gettext needs it! gettext.bindtextdomain("CurlyTx", resolveFilename(SCOPE_PLUGINS, "Extensions/CurlyTx/locale")) def _(txt): + """ Custom gettext translation function that uses the CurlyTx domain """ t = gettext.dgettext("CurlyTx", txt) if t == txt: #print "[CurlyTx] fallback to default translation for", txt |
