1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-16 18:01:40 +00:00

Auto-detect locale on Android (#13561)

This commit is contained in:
Gregor Parzefall 2023-06-05 12:02:10 +02:00 committed by GitHub
parent a857c46e6e
commit a1463263b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 68 additions and 49 deletions

View file

@ -203,7 +203,10 @@ void init_gettext(const char *path, const std::string &configured_language,
#endif // ifndef _WIN32
}
else {
/* set current system default locale */
#ifdef __ANDROID__
setenv("LANG", porting::getLanguageAndroid().c_str(), 1);
#endif
/* set current system default locale */
setlocale(LC_ALL, "");
}