summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-01-06 13:23:28 +0000
committerCarl Hetherington <cth@carlh.net>2014-01-06 13:23:28 +0000
commit3a51cc23de37ff0821009af780ef56e0e28394f7 (patch)
tree7d1a3b5ce730ac5c046b995e8157273333df1df8
parentbede7ad707193f6c3be4fcba622bb516bb068644 (diff)
Override LC_ALL as well as LANGUAGE and LANG when forcing locale.
-rw-r--r--ChangeLog3
-rw-r--r--src/lib/util.cc2
2 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index cda331368..8aa51761d 100644
--- 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).
diff --git a/src/lib/util.cc b/src/lib/util.cc
index 32b1805be..edb202df2 100644
--- a/src/lib/util.cc
+++ b/src/lib/util.cc
@@ -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, "");