activate language when used in standalone screen
[enigma2.git] / lib / python / Screens / LanguageSelection.py
index ca7f219..a0441b6 100644 (file)
@@ -2,14 +2,17 @@ from Screen import Screen
 
 from Components.MenuList import MenuList
 from Components.ActionMap import ActionMap
+from Components.Language import language
 
 class LanguageSelection(Screen):
        def __init__(self, session):
                Screen.__init__(self, session)
                
                self.list = []
-               self.list.append(("English", None))
-               self.list.append(("German", None))
+               list = language.getLanguageList()
+               for x in list:
+                       self.list.append((x, None))
+
                self["list"] = MenuList(self.list)
                
                self["actions"] = ActionMap(["OkCancelActions"], 
@@ -19,7 +22,8 @@ class LanguageSelection(Screen):
                })
                
        def save(self):
-               pass
+               self.run()
+               self.close()
        
        def run(self):
-               print "select the language here"
\ No newline at end of file
+               language.activateLanguage(self["list"].l.getCurrentSelectionIndex())