Fix disabling l10n under Linux
This commit is contained in:
parent
c04b05f497
commit
6ad3dc1e43
@ -275,6 +275,14 @@ int main (int argc, char *argv[])
|
|||||||
if (!setlocale (LC_ALL, "")) {
|
if (!setlocale (LC_ALL, "")) {
|
||||||
std::cerr << "localization call failed, " << PROGRAM_NAME << " will not be translated\n";
|
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
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user