From b6276d53cfea4ef111bb8df815e79e863eab3e2f Mon Sep 17 00:00:00 2001 From: John Maguire Date: Wed, 26 Sep 2012 12:05:43 +0200 Subject: [PATCH] Use UI language where available instead of system language. Fixes issue #3175 --- src/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 27e11d7e0..f3dbde594 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -117,8 +117,10 @@ void LoadTranslation(const QString& prefix, const QString& path, return; #endif + QString system_language = QLocale::system().uiLanguages().empty() ? + QLocale::system().name() : QLocale::system().uiLanguages()[0]; QString language = override_language.isEmpty() ? - QLocale::system().name() : override_language; + system_language : override_language; QTranslator* t = new PoTranslator; if (t->load(prefix + "_" + language, path))