IMDB: some changes for new Default skin
[enigma2-plugins.git] / videocolorspace / src / __init__.py
1 from Components.Language import language
2 from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_LANGUAGE
3 from os import environ
4 import gettext
5
6 def localeInit():
7     lang = language.getLanguage()
8     environ["LANGUAGE"] = lang[:2]
9     gettext.bindtextdomain("enigma2", resolveFilename(SCOPE_LANGUAGE))
10     gettext.textdomain("enigma2")
11     gettext.bindtextdomain("VideoColorSpace", resolveFilename(SCOPE_PLUGINS, "SystemPlugins/VideoColorSpace/locale/"))
12
13 def _(txt):
14     t = gettext.dgettext("VideoColorSpace", txt)
15     if t == txt:
16         t = gettext.gettext(txt)
17     return t
18
19 localeInit()
20 language.addCallback(localeInit)