1
0
mirror of https://github.com/naruxde/revpipycontrol.git synced 2025-11-08 15:43:52 +01:00

Bugfix: Automatische Sprachwahl

This commit is contained in:
2017-07-03 20:11:34 +02:00
parent 6103104d96
commit 9e9751883d

View File

@@ -34,8 +34,10 @@ def gettrans(proglang=None):
if proglang is None: if proglang is None:
# Autodetect Language or switch to static # Autodetect Language or switch to static
proglang = locale.getdefaultlocale()[0] proglang = locale.getdefaultlocale()[0]
if not proglang is None and proglang.find("_") >= 0: if proglang is not None and proglang.find("_") >= 0:
proglang = proglang.split('_')[0] proglang = proglang.split('_')[0]
else:
proglang = "en"
# Übersetzungen laden # Übersetzungen laden
trans = gettext.translation( trans = gettext.translation(