From 6103104d962c1e87fa853e10b7469c835ffd7240 Mon Sep 17 00:00:00 2001 From: NaruX Date: Mon, 3 Jul 2017 18:22:26 +0200 Subject: [PATCH] Bugfix: Automatische Sprachwahl --- revpipycontrol/mytools.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/revpipycontrol/mytools.py b/revpipycontrol/mytools.py index fb90979..c23d3bc 100644 --- a/revpipycontrol/mytools.py +++ b/revpipycontrol/mytools.py @@ -33,8 +33,9 @@ def gettrans(proglang=None): # Sprache auswählen if proglang is None: # Autodetect Language or switch to static - # proglang = "en" - proglang = locale.getdefaultlocale()[0].split('_')[0] + proglang = locale.getdefaultlocale()[0] + if not proglang is None and proglang.find("_") >= 0: + proglang = proglang.split('_')[0] # Übersetzungen laden trans = gettext.translation(