[core] Fix local language not being used in some cases

Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
This commit is contained in:
Yannik Bloscheck
2025-08-05 17:44:13 +02:00
parent f09b372590
commit 185ae66101
4 changed files with 50 additions and 27 deletions

View File

@@ -191,6 +191,11 @@ std::string GetCurrentMapLanguage()
std::vector<int8_t> GetPreferredLangIndexes()
{
std::vector<int8_t> langs = {};
auto const mapLang = StringUtf8Multilang::GetLangIndex(languages::GetCurrentMapLanguage());
if (mapLang != StringUtf8Multilang::kUnsupportedLanguageCode)
langs.push_back(mapLang);
for (auto const & systemLanguage : GetSystemPreferred())
{
auto normalizedLang = Normalize(systemLanguage);