From bb59fd202b257cce05684912216678d9872ff0cc Mon Sep 17 00:00:00 2001 From: Stefan Pluecken Date: Thu, 17 Nov 2005 21:27:22 +0000 Subject: some basic language support (already working a bit) --- lib/python/Components/SetupDevices.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/python/Components/SetupDevices.py') diff --git a/lib/python/Components/SetupDevices.py b/lib/python/Components/SetupDevices.py index 612bb8c8..6ce8737b 100644 --- a/lib/python/Components/SetupDevices.py +++ b/lib/python/Components/SetupDevices.py @@ -6,6 +6,7 @@ from config import ConfigSlider from config import configSelection from config import configText from Components.Timezones import timezones +from Components.Language import language def InitSetupDevices(): @@ -26,7 +27,12 @@ def InitSetupDevices(): config.osd.alpha = configElement("config.osd.alpha", ConfigSlider, 0, ""); config.osd.bright = configElement("config.osd.bright", ConfigSlider, 5, ""); config.osd.contrast = configElement("config.osd.contrast", ConfigSlider, 5, ""); - config.osd.language = configElement("config.osd.language", configSelection, 0, ("English", "English US") ); + + def languageNotifier(configElement): + language.activateLanguage(configElement.value) + + config.osd.language = configElement("config.osd.language", configSelection, 0, language.getLanguageList() ); + config.osd.language.addNotifier(languageNotifier) config.parental = ConfigSubsection(); config.parental.lock = configElement("config.parental.lock", configSelection, 1, ("Enable", "Disable") ); -- cgit v1.2.3