Enigma2 plugin to to play various online streams (mostly Latvian).

1234567891011121314151617181920
  1. from os import environ
  2. from gettext import bindtextdomain, dgettext, gettext
  3. from Components.Language import language
  4. from Tools.Directories import resolveFilename, SCOPE_PLUGINS
  5. def localeInit():
  6. environ["LANGUAGE"] = language.getLanguage()[:2]
  7. bindtextdomain("PlayStream", resolveFilename(SCOPE_PLUGINS, "Extensions/PlayStream/locale"))
  8. def _(txt):
  9. t = dgettext("PlayStream", txt)
  10. if t == txt:
  11. t = gettext(txt)
  12. return t
  13. localeInit()
  14. language.addCallback(localeInit)