V0.6 #852
|
@ -44,6 +44,7 @@ from about import *
|
||||||
from help import *
|
from help import *
|
||||||
from iconglossary import *
|
from iconglossary import *
|
||||||
from connect import *
|
from connect import *
|
||||||
|
import locale as pythonlocale
|
||||||
import sys
|
import sys
|
||||||
from time import strftime, localtime, gmtime
|
from time import strftime, localtime, gmtime
|
||||||
import time
|
import time
|
||||||
|
@ -99,6 +100,17 @@ def change_translation(locale):
|
||||||
qsystranslator.load(translationpath)
|
qsystranslator.load(translationpath)
|
||||||
QtGui.QApplication.installTranslator(qsystranslator)
|
QtGui.QApplication.installTranslator(qsystranslator)
|
||||||
|
|
||||||
|
lang = l10n.getTranslationLanguage()
|
||||||
|
if "_" not in lang:
|
||||||
|
lang += "_" + lang.upper()
|
||||||
|
if ".utf8" not in lang.lower():
|
||||||
|
lang += ".utf8"
|
||||||
|
try:
|
||||||
|
pythonlocale.setlocale(pythonlocale.LC_ALL, lang)
|
||||||
|
except:
|
||||||
|
logger.error("Failed to set locale to %s", lang)
|
||||||
|
pass
|
||||||
|
|
||||||
class MyForm(settingsmixin.SMainWindow):
|
class MyForm(settingsmixin.SMainWindow):
|
||||||
|
|
||||||
# sound type constants
|
# sound type constants
|
||||||
|
|
Reference in New Issue
Block a user