1 from Screen import Screen
3 from Components.MenuList import MenuList
4 from Components.ActionMap import ActionMap
5 from Components.Language import language
6 from Components.LanguageList import *
7 from Components.config import config
10 class LanguageSelection(Screen):
11 def __init__(self, session):
12 Screen.__init__(self, session)
15 if len(language.lang) == 0: # no language available => display only english
16 self.list.append(LanguageEntryComponent("en", _("English")))
18 for x in language.lang:
19 self.list.append(LanguageEntryComponent(x[2], x[0]))
21 self["list"] = LanguageList(self.list)
23 self["actions"] = ActionMap(["OkCancelActions"],
34 language.activateLanguage(self["list"].l.getCurrentSelectionIndex())
35 config.osd.language.value = self["list"].l.getCurrentSelectionIndex()
36 config.osd.language.save()