summaryrefslogtreecommitdiff
path: root/eglib/src/gmisc-win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'eglib/src/gmisc-win32.c')
-rw-r--r--eglib/src/gmisc-win32.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/eglib/src/gmisc-win32.c b/eglib/src/gmisc-win32.c
index 07dcf39aec..f89f37c220 100644
--- a/eglib/src/gmisc-win32.c
+++ b/eglib/src/gmisc-win32.c
@@ -87,10 +87,12 @@ g_unsetenv(const gchar *variable)
gchar*
g_win32_getlocale(void)
{
- /* FIXME: Use GetThreadLocale
- * and convert LCID to standard
- * string form, "en_US" */
- return strdup ("en_US");
+ LCID lcid = GetThreadLocale();
+ gchar buf[19];
+ gint ccBuf = GetLocaleInfo(lcid, LOCALE_SISO639LANGNAME, buf, 9);
+ buf[ccBuf - 1] = '-';
+ ccBuf += GetLocaleInfo(lcid, LOCALE_SISO3166CTRYNAME, buf + ccBuf, 9);
+ return strdup(buf);
}
gboolean