From 6ad3dc1e43d367b8e899977d48dfb68e7e6cddde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20=C5=A0milauer?= Date: Sun, 9 Oct 2022 08:26:52 +0200 Subject: [PATCH] Fix disabling l10n under Linux --- gtk2_ardour/main.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gtk2_ardour/main.cc b/gtk2_ardour/main.cc index cd3d9a68dc..8faddc7848 100644 --- a/gtk2_ardour/main.cc +++ b/gtk2_ardour/main.cc @@ -275,6 +275,14 @@ int main (int argc, char *argv[]) if (!setlocale (LC_ALL, "")) { std::cerr << "localization call failed, " << PROGRAM_NAME << " will not be translated\n"; } + } else { + /* Force-disable localization if the user wishes so; + just calling setlocale (...,"C") is not sufficient for this; + it is probably the LANG env var which gets picked up later somewhere. + */ + setenv ("LC_ALL", "C", 1); + setenv ("LC_MESSAGES", "C", 1); + setenv ("LANG", "C", 1); } #endif