# HG changeset patch # User unc0rr # Date 1369156952 -14400 # Node ID 4b8e326251b37b31bb715fa124efcab5a7eb54fb # Parent 95d59fad86997b3533a54cda157c81bfcbc3461b Use old method of locale detection, fallback to new one in case of problems diff -r 95d59fad8699 -r 4b8e326251b3 QTfrontend/main.cpp --- 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)))