1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-18 03:21:27 +02:00

Merge pull request #3342 from Laserlicht/language_select_fix

[launcher] select first language
This commit is contained in:
Ivan Savenko 2023-12-18 13:33:35 +02:00 committed by GitHub
commit 46cdbe4161
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -136,14 +136,14 @@ void MainWindow::detectPreferredLanguage()
for (auto const & vcmiLang : Languages::getLanguageList())
if (vcmiLang.tagIETF == userLang.toStdString())
selectedLanguage = vcmiLang.identifier;
}
logGlobal->info("Selected language: %s", selectedLanguage);
if (!selectedLanguage.empty())
{
Settings node = settings.write["general"]["language"];
node->String() = selectedLanguage;
if (!selectedLanguage.empty())
{
logGlobal->info("Selected language: %s", selectedLanguage);
Settings node = settings.write["general"]["language"];
node->String() = selectedLanguage;
return;
}
}
}