Try UTF-8 locale encoding
- setlocale didn't always try UTF-8, and on systems that only had UTF-8 encoding of the selected locale, this would fail to change locale Fixes #872
This commit is contained in:
parent
0dd54e606d
commit
65211703c0
|
@ -105,7 +105,7 @@ def change_translation(locale):
|
||||||
QtGui.QApplication.installTranslator(qsystranslator)
|
QtGui.QApplication.installTranslator(qsystranslator)
|
||||||
|
|
||||||
lang = pythonlocale.normalize(l10n.getTranslationLanguage())
|
lang = pythonlocale.normalize(l10n.getTranslationLanguage())
|
||||||
langs = [lang.split(".")[0] + "." + l10n.encoding, lang]
|
langs = [lang.split(".")[0] + "." + l10n.encoding, lang.split(".")[0] + "." + 'UTF-8', lang]
|
||||||
if 'win32' in sys.platform or 'win64' in sys.platform:
|
if 'win32' in sys.platform or 'win64' in sys.platform:
|
||||||
langs = [l10n.getWindowsLocale(lang)]
|
langs = [l10n.getWindowsLocale(lang)]
|
||||||
for lang in langs:
|
for lang in langs:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user