diff --git a/src/main.cpp b/src/main.cpp index 768f74371..05fade454 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -724,7 +724,9 @@ void initUserConfig(char *argv[]) if (UserConfigParams::m_language.toString() != "system") { #ifdef WIN32 - SetEnvironmentVariableA("LANGUAGE", UserConfigParams::m_language.c_str()); + std::string s=std::string("LANGUAGE=") + +UserConfigParams::m_language.c_str(); + _putenv(s.c_str()); #else setenv("LANGUAGE", UserConfigParams::m_language.c_str(), 1); #endif diff --git a/src/states_screens/main_menu_screen.cpp b/src/states_screens/main_menu_screen.cpp index e8ffd0f8f..a787aef89 100644 --- a/src/states_screens/main_menu_screen.cpp +++ b/src/states_screens/main_menu_screen.cpp @@ -226,7 +226,6 @@ void MainMenuScreen::eventCallback(Widget* widget, const std::string& name, cons if (selection == "system") { #ifdef WIN32 - SetEnvironmentVariable("LANGUAGE", ""); _putenv("LANGUAGE="); #else setenv( "LANGUAGE", "", 1);