Fixed language changing on linux (putenv does not copy the environment
variables, so the setting got lost, so I replaced this with setenv. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7607 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
c78373433f
commit
ade507a369
@ -217,19 +217,13 @@ void MainMenuScreen::eventCallback(Widget* widget, const std::string& name, cons
|
||||
|
||||
delete translations;
|
||||
|
||||
#ifdef WIN32
|
||||
// Avoid depreciation warnings in windows.
|
||||
# define putenv(a) _putenv(a)
|
||||
#endif
|
||||
if (selection == "system")
|
||||
{
|
||||
putenv( "LANGUAGE=" );
|
||||
setenv( "LANGUAGE=", "", 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
char buffer[1024];
|
||||
snprintf(buffer, 1024, "LANGUAGE=%s", selection.c_str());
|
||||
putenv( buffer );
|
||||
setenv("LANGUAGE", selection.c_str(), 1);
|
||||
}
|
||||
|
||||
translations = new Translations();
|
||||
|
Loading…
Reference in New Issue
Block a user