projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
b09b63d
)
Merge pull request #806 from AxlPr/master
author
Zoltan Varga
<vargaz@gmail.com>
Thu, 12 Dec 2013 21:51:14 +0000
(13:51 -0800)
committer
Zoltan Varga
<vargaz@gmail.com>
Thu, 12 Dec 2013 21:51:14 +0000
(13:51 -0800)
Fixed g_win32_getlocale
eglib/src/gmisc-win32.c
patch
|
blob
|
history
diff --git
a/eglib/src/gmisc-win32.c
b/eglib/src/gmisc-win32.c
index 07dcf39aec86c58ffbbe9cccb19b5291d30cc576..f89f37c22049a780451ff55dcb4d3369ce8d1d10 100644
(file)
--- 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