QTfrontend/main.cpp
changeset 9027 4b8e326251b3
parent 8918 512753ea4b1b
child 9080 9b42757d7e71
--- a/QTfrontend/main.cpp	Tue May 21 11:32:42 2013 -0400
+++ b/QTfrontend/main.cpp	Tue May 21 21:22:32 2013 +0400
@@ -268,8 +268,13 @@
 
         QString cc = settings.value("misc/locale", QString()).toString();
         if (cc.isEmpty())
-            cc = HWApplication::keyboardInputLocale().name();
-            // QLocale::system().name() returns only "C"...
+        {
+            cc = QLocale::system().name();
+
+            // Fallback to current input locale if "C" locale is returned
+            if(cc == "C")
+                cc = HWApplication::keyboardInputLocale().name();
+        }
 
         // load locale file into translator
         if (!Translator.load(QString("physfs://Locale/hedgewars_%1").arg(cc)))