1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

select first language

This commit is contained in:
Laserlicht 2023-12-17 23:48:21 +01:00 committed by GitHub
parent c04efa8ac4
commit 0b82f6954f
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;
}
}
}