summaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
authorDaniel Molkentin <daniel.molkentin@nokia.com>2010-01-05 16:33:30 +0100
committerDaniel Molkentin <daniel.molkentin@nokia.com>2010-01-05 16:40:20 +0100
commitf093025ff37e44e50b821d5ae3b933139ac75d4b (patch)
tree56fca79b0edc924dbb4f598fa32a2c07036c0dd6 /src/app
parent40f5d38b918cdb84ca0b0548ce605b45af1d532c (diff)
downloadqt-creator-f093025ff37e44e50b821d5ae3b933139ac75d4b.tar.gz
Make it possible to override the language settings in Creator.
Platform-dependent behavior is not good enough for a lot of people it seems. Reviewed-By: con
Diffstat (limited to 'src/app')
-rw-r--r--src/app/main.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/app/main.cpp b/src/app/main.cpp
index f4d17c4bf4..26c7e85d5b 100644
--- a/src/app/main.cpp
+++ b/src/app/main.cpp
@@ -40,6 +40,7 @@
#include <QtCore/QTimer>
#include <QtCore/QLibraryInfo>
#include <QtCore/QTranslator>
+#include <QtCore/QSettings>
#include <QtCore/QVariant>
#include <QtGui/QMessageBox>
@@ -179,6 +180,12 @@ int main(int argc, char **argv)
QTranslator translator;
QTranslator qtTranslator;
QString locale = QLocale::system().name();
+ // keep this in sync with the MainWindow ctor in coreplugin/mainwindow.cpp
+ const QSettings settings(QSettings::IniFormat, QSettings::UserScope,
+ QLatin1String("Nokia"), QLatin1String("QtCreator"));
+ locale = settings.value("General/OverrideLanguage", locale).toString();
+
+
const QString &creatorTrPath = QCoreApplication::applicationDirPath()
+ QLatin1String(SHARE_PATH "/translations");
if (translator.load(QLatin1String("qtcreator_") + locale, creatorTrPath)) {