Override LC_ALL as well as LANGUAGE and LANG when forcing locale.
authorCarl Hetherington <cth@carlh.net>
Mon, 6 Jan 2014 13:23:28 +0000 (13:23 +0000)
committerCarl Hetherington <cth@carlh.net>
Mon, 6 Jan 2014 13:23:28 +0000 (13:23 +0000)
ChangeLog
src/lib/util.cc

index cda3313682639c334cbbabd988bab6888f7b3c64..8aa51761dea5ebc52fb22e7ddd06cd4ad8637a26 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2014-01-06  Carl Hetherington  <cth@carlh.net>
 
+       * Make sure forced languages override the environment for gettext()
+       as well as wxWidgets' i18n code (#108).
+
        * Bump libdcp version to get a fix for VOLINDEX/ASSETMAP file extensions
        with interop (#206).
 
index 32b1805be622051fe6c3946888c5b994978abdc5..edb202df260ea0f6dd333a8a455e627deeb07d22 100644 (file)
@@ -350,6 +350,8 @@ dcpomatic_setup_gettext_i18n (string lang)
                putenv (cmd);
                snprintf (cmd, sizeof(cmd), "LANG=%s", lang.c_str ());
                putenv (cmd);
+               snprintf (cmd, sizeof(cmd), "LC_ALL=%s", lang.c_str ());
+               putenv (cmd);
        }
 
        setlocale (LC_ALL, "");