summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2026-03-12 01:00:51 +0100
committerCarl Hetherington <cth@carlh.net>2026-03-12 01:24:06 +0100
commit45eee5e618af30e893320b9245aaf4e5f3072753 (patch)
treed9b29444c75b4265b8c8c34e992d016534a84f46 /src
parentfcd83b4113b4546442c6c94afbd0719c74b8458a (diff)
Fix language forcing.
We'd always try to do it, even if the passed-in string was empty, which must surely be wrong...
Diffstat (limited to 'src')
-rw-r--r--src/lib/i18n_setup_linux.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/i18n_setup_linux.cc b/src/lib/i18n_setup_linux.cc
index 2fa148e26..37207e29d 100644
--- a/src/lib/i18n_setup_linux.cc
+++ b/src/lib/i18n_setup_linux.cc
@@ -38,12 +38,11 @@ dcpomatic::mo_path()
void
dcpomatic::setup_i18n(string forced_language)
{
- forced_language += ".UTF8";
-
if (!forced_language.empty()) {
/* Override our environment forced_language. Note that the caller must not
free the string passed into putenv().
*/
+ forced_language += ".UTF8";
string s = fmt::format("LANGUAGE={}", forced_language);
putenv(strdup(s.c_str()));
s = fmt::format("LANG={}", forced_language);