From 9a47164c46cdbb7bc45edd639900201b19c63f5b Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Sat, 6 May 2017 21:21:07 +0200 Subject: [PATCH] use the LANG env var (if set) to determine the system language on Linux/Mac Candidate fix for #3864 --- rtgui/multilangmgr.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rtgui/multilangmgr.cc b/rtgui/multilangmgr.cc index 4c0b78fc9..d8a619292 100644 --- a/rtgui/multilangmgr.cc +++ b/rtgui/multilangmgr.cc @@ -196,7 +196,8 @@ Glib::ustring MultiLangMgr::getOSUserLanguage () #elif defined (__linux__) || defined (__APPLE__) // Query the current locale and force decimal point to dot. - if (const char* locale = setlocale (LC_CTYPE, "")) { + const char *locale = getenv("LANG"); + if (locale || (locale = setlocale (LC_CTYPE, ""))) { langName = localeToLang (locale); }