summaryrefslogtreecommitdiff
path: root/navit/main.c
diff options
context:
space:
mode:
authorMichael Dankov <tryagain@navit-project.org>2015-11-15 03:30:59 +0300
committerMichael Dankov <tryagain@navit-project.org>2015-11-15 03:30:59 +0300
commit142a4dd15b8594359c982e06ace69d5ad0309c0c (patch)
tree3ada3760c1e4a476a5e9bee7c3f6f9c8a5fb7dfa /navit/main.c
parent316eefa41213edf0e62fa25658674047fbadae95 (diff)
downloadnavit-142a4dd15b8594359c982e06ace69d5ad0309c0c.tar.gz
Fix navigation messages translations in Android LollipopR6372
Do not set locale to "C" for LC_NUMERIC, and do not call setlocale at all on Android, because: - Since Lollipop, Android attempts to do something in setlocale, but its implementation is far from complete and makes no sense for us at this point. - Older Android versions used to completely ignore setlocale() calls.
Diffstat (limited to 'navit/main.c')
-rw-r--r--navit/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/navit/main.c b/navit/main.c
index 39cedc690..986bcb13b 100644
--- a/navit/main.c
+++ b/navit/main.c
@@ -339,9 +339,11 @@ main_init(const char *program)
#ifdef HAVE_API_WIN32_BASE
win_set_nls();
#endif
+#ifndef HAVE_API_ANDROID
setenv("LC_NUMERIC","C",1);
setlocale(LC_ALL,"");
setlocale(LC_NUMERIC,"C");
+#endif
#if !defined _WIN32 && !defined _WIN32_WCE
if (file_exists("navit.c") || file_exists("navit.o") || file_exists("navit.lo") || file_exists("version.h")) {
char buffer[PATH_MAX];