language selection in startwizard filled with functionality
[enigma2.git] / lib / python / Screens / LanguageSelection.py
1 from Screen import Screen
2
3 from Components.MenuList import MenuList
4 from Components.ActionMap import ActionMap
5 from Components.Language import language
6
7 class LanguageSelection(Screen):
8         def __init__(self, session):
9                 Screen.__init__(self, session)
10                 
11                 self.list = []
12                 list = language.getLanguageList()
13                 for x in list:
14                         self.list.append((x, None))
15
16                 self["list"] = MenuList(self.list)
17                 
18                 self["actions"] = ActionMap(["OkCancelActions"], 
19                 {
20                         "ok": self.save,
21                         "cancel": self.close
22                 })
23                 
24         def save(self):
25                 pass
26         
27         def run(self):
28                 language.activateLanguage(self["list"].l.getCurrentSelectionIndex())