summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 262c63d4a..642b967b1 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -167,6 +167,10 @@ int start_time;
int textures_count = 0;
+#ifdef WIN32
+extern "C" char const *_nl_locale_name_default(void);
+#endif
+
/**
* Advances game logic counter.
* Called every 10 milliseconds by SDL_AddTimer()
@@ -289,6 +293,9 @@ Client::Client(const Options &options):
#if ENABLE_NLS
std::string lang = config.getValue("lang", "");
#ifdef WIN32
+ if (lang == "")
+ lang = std::string(_nl_locale_name_default());
+
putenv((char*)("LANG=" + lang).c_str());
putenv((char*)("LANGUAGE=" + lang).c_str());
// mingw doesn't like LOCALEDIR to be defined for some reason