4 from Tools.Directories import *
8 gettext.install('enigma2', resolveFilename(SCOPE_LANGUAGE, ""), unicode=0, codeset="utf-8")
9 self.activeLanguage = 0
11 # FIXME make list dynamically
12 # name, iso-639 language, iso-3166 country. Please don't mix language&country!
13 self.addLanguage(_("English"), "en", "EN")
14 self.addLanguage(_("German"), "de", "DE")
15 self.addLanguage(_("Arabic"), "ar", "AE")
16 self.addLanguage(_("Dutch"), "nl", "NL")
17 self.addLanguage(_("Spanish"), "es", "ES")
19 def addLanguage(self, name, lang, country):
21 self.lang.append((_(name), gettext.translation('enigma2', resolveFilename(SCOPE_LANGUAGE, ""), languages=[lang]), lang, country))
23 print "Language " + str(name) + " not found"
25 def activateLanguage(self, index):
27 print "Activating language " + str(self.lang[index][0])
28 self.lang[index][1].install()
29 self.activeLanguage = index
31 print "Selected language does not exist!"
33 def getLanguageList(self):