diff options
author | Pevernow <3450354617@qq.com> | 2021-08-09 00:59:07 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-08 18:59:07 +0200 |
commit | c6eddb0bae32c43ffff46e9c1e3f293d0fd9ed73 (patch) | |
tree | c8cfd861330d8be7970ed67ae4e70d92b703e3f5 /src/gettext.cpp | |
parent | 4a3728d828fa8896b49e80fdc68f5d7647bf45b7 (diff) | |
download | minetest-c6eddb0bae32c43ffff46e9c1e3f293d0fd9ed73.tar.xz |
Gettext support on Android (#11435)
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: =?UTF-8?q?Olivier=20Samyn=20=F0=9F=8E=BB?= <code@oleastre.be>
Diffstat (limited to 'src/gettext.cpp')
-rw-r--r-- | src/gettext.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gettext.cpp b/src/gettext.cpp index 6818004df..de042cf35 100644 --- a/src/gettext.cpp +++ b/src/gettext.cpp @@ -127,6 +127,10 @@ void init_gettext(const char *path, const std::string &configured_language, // Add user specified locale to environment setenv("LANGUAGE", configured_language.c_str(), 1); +#ifdef __ANDROID__ + setenv("LANG", configured_language.c_str(), 1); +#endif + // Reload locale with changed environment setlocale(LC_ALL, ""); #elif defined(_MSC_VER) |