|
|
@ -364,6 +364,7 @@ QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting) |
|
|
|
void QGCApplication::setLanguage() |
|
|
|
void QGCApplication::setLanguage() |
|
|
|
{ |
|
|
|
{ |
|
|
|
QLocale locale = QLocale::system(); |
|
|
|
QLocale locale = QLocale::system(); |
|
|
|
|
|
|
|
qDebug() << "System reported locale:" << locale << locale.name(); |
|
|
|
//-- See App.SettinsGroup.json for index
|
|
|
|
//-- See App.SettinsGroup.json for index
|
|
|
|
int langID = toolbox()->settingsManager()->appSettings()->language()->rawValue().toInt(); |
|
|
|
int langID = toolbox()->settingsManager()->appSettings()->language()->rawValue().toInt(); |
|
|
|
if(langID) { |
|
|
|
if(langID) { |
|
|
@ -394,7 +395,6 @@ void QGCApplication::setLanguage() |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
qDebug() << "System reported locale:" << locale << locale.name(); |
|
|
|
|
|
|
|
//-- Our localization
|
|
|
|
//-- Our localization
|
|
|
|
if(_QGCTranslator.load(locale, "qgc_", "", ":/localization")) |
|
|
|
if(_QGCTranslator.load(locale, "qgc_", "", ":/localization")) |
|
|
|
_app->installTranslator(&_QGCTranslator); |
|
|
|
_app->installTranslator(&_QGCTranslator); |
|
|
|