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:
parent
a857c46e6e
commit
a1463263b5
4 changed files with 68 additions and 49 deletions
|
@ -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, "");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue