mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-24 16:12:42 -06:00
qt: Fix default languege not being set to the main one the system uses
This commit is contained in:
parent
f004700127
commit
e284607438
1 changed files with 3 additions and 2 deletions
|
@ -3413,8 +3413,9 @@ void GMainWindow::LoadTranslation() {
|
||||||
bool loaded;
|
bool loaded;
|
||||||
|
|
||||||
if (UISettings::values.language.isEmpty()) {
|
if (UISettings::values.language.isEmpty()) {
|
||||||
// If the selected language is empty, use system locale
|
// Use the system's default locale
|
||||||
loaded = translator.load(QLocale(), {}, {}, QStringLiteral(":/languages/"));
|
QLocale defaultLocale = QLocale::system();
|
||||||
|
loaded = translator.load(defaultLocale, {}, {}, QStringLiteral(":/languages/"));
|
||||||
} else {
|
} else {
|
||||||
// Otherwise load from the specified file
|
// Otherwise load from the specified file
|
||||||
loaded = translator.load(UISettings::values.language, QStringLiteral(":/languages/"));
|
loaded = translator.load(UISettings::values.language, QStringLiteral(":/languages/"));
|
||||||
|
|
Loading…
Reference in a new issue