Follow-up Comment #14, bug #8807 (project wesnoth):
Don't forget to change the second parameter of the initial setlocale call to
"", following the documentation of LibIntl.
The line:
> SetEnvironmentVariable("LANG", win_locale.c_str());
Should be removed as it has no effect. As I hypothesised before, I made a
mistake when trying to skip the _putenv call, and the other stuff about
_putenv works as I described; the only thing this line does is change the LANG
environment variable to a different value from what the CRT thinks it is.
Regardless, unless you use _putenv, LibIntl won't see the change. (The crap we
have to deal with for supporting envp and _environ even though no sane person
uses it...)
As a final point, since _putenv is deprecated, change:
> std::string env = "LANGUAGE=" + locale; _putenv(env.c_str());
To:
> _putenv_s("LANGUAGE", locale.c_str());
Two more remarks:
*The reason clearing the LANGUAGE variable earlier on didn't work for me was
because I used SetEnvironmentVariable rather than _putenv.
*Passing the desired locale identifier to setlocale doesn't work as you'd
expect.
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?8807>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs