[android] Add function to get all android system languages

Signed-off-by: gekeleda <git@davidgekeler.eu>
This commit is contained in:
gekeleda
2025-11-23 20:23:43 +01:00
committed by x7z4w
parent 2c37e22f5c
commit 1d087ca854
3 changed files with 59 additions and 12 deletions

View File

@@ -24,7 +24,7 @@
#include <cstdlib>
#elif defined(OMIM_OS_ANDROID)
/// Body for this function is inside android/sdk/src/main/cpp sources
std::string GetAndroidSystemLanguage();
std::vector<std::string> GetAndroidSystemLanguages();
#else
#error "Define language preferences for your platform"
#endif
@@ -514,7 +514,9 @@ struct SystemLanguages
}
#elif defined(OMIM_OS_ANDROID)
m_langs.push_back(GetAndroidSystemLanguage());
std::vector<std::string> system_langs = GetAndroidSystemLanguages();
for (auto const & lang : system_langs)
m_langs.push_back(lang);
#else
#error "Define language preferences for your platform"
#endif