|
|
@ -20,15 +20,18 @@ int main(int argc, char *argv[])
|
|
|
|
locale = QLocale::system().name();
|
|
|
|
locale = QLocale::system().name();
|
|
|
|
settings.setValue("language", locale);
|
|
|
|
settings.setValue("language", locale);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
QString tsFile = "2048-qt_" + locale;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QTranslator translator;
|
|
|
|
QTranslator translator;
|
|
|
|
|
|
|
|
if (! locale.startsWith("en")) {
|
|
|
|
|
|
|
|
QString tsFile = "2048-qt_" + locale;
|
|
|
|
|
|
|
|
|
|
|
|
if (translator.load(tsFile, ":/ts")) {
|
|
|
|
if (translator.load(tsFile, ":/ts")) {
|
|
|
|
qDebug() << "Successfully loaded " + tsFile;
|
|
|
|
qDebug() << "Successfully loaded " + tsFile;
|
|
|
|
|
|
|
|
app.installTranslator(&translator);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
qDebug() << "Failed to load " + tsFile;
|
|
|
|
qDebug() << "Failed to load " + tsFile;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
app.installTranslator(&translator);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
QQmlApplicationEngine engine;
|
|
|
|
QQmlApplicationEngine engine;
|
|
|
|
|
|
|
|
|
|
|
|