summaryrefslogtreecommitdiffstats
path: root/pyLoadGui.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-02-10 21:59:31 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-02-10 21:59:31 +0100
commit6c4eabfc4b686a72224ff06cb56c385bfc489790 (patch)
tree913239e4a2d994e813134b94f66a49eec9a4b201 /pyLoadGui.py
parentwebif patch #75 (thx kepheus) (diff)
downloadpyload-6c4eabfc4b686a72224ff06cb56c385bfc489790.tar.xz
Webinterface with lighttpd! locale fixing try.
Diffstat (limited to 'pyLoadGui.py')
-rwxr-xr-xpyLoadGui.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/pyLoadGui.py b/pyLoadGui.py
index c0fc98c5b..b4a518036 100755
--- a/pyLoadGui.py
+++ b/pyLoadGui.py
@@ -57,8 +57,19 @@ class main(QObject):
if not lang:
parser = XMLParser("module/config/gui_default.xml")
lang = parser.xml.elementsByTagName("language").item(0).toElement().text()
- translation = gettext.translation("pyLoadGui", join(dirname(__file__), "locale"), languages=[str(lang)])
- translation.install(unicode=False if sys.getdefaultencoding() == "ascii" else True)
+
+ translation = gettext.translation("pyLoadGui", join(dirname(__file__), "locale"), languages=[str(lang)])
+
+ try:
+ translation.ugettext("äöü")
+ unicode = True
+ except:
+ unicode = False
+
+ #@TODO cleaner method, if possible
+
+ translation.install(unicode)
+
self.mainWindow = MainWindow()
self.pwWindow = PWInputWindow()
self.connWindow = ConnectionManager()