r15089 - gnucash/trunk/src/gnome - Add win32 method for looking up the current LANG string
Christian Stimming
cstim at cvs.gnucash.org
Mon Nov 6 10:27:44 EST 2006
Author: cstim
Date: 2006-11-06 10:27:42 -0500 (Mon, 06 Nov 2006)
New Revision: 15089
Trac: http://svn.gnucash.org/trac/changeset/15089
Modified:
gnucash/trunk/src/gnome/druid-hierarchy.c
Log:
Add win32 method for looking up the current LANG string
Modified: gnucash/trunk/src/gnome/druid-hierarchy.c
===================================================================
--- gnucash/trunk/src/gnome/druid-hierarchy.c 2006-11-06 04:45:27 UTC (rev 15088)
+++ gnucash/trunk/src/gnome/druid-hierarchy.c 2006-11-06 15:27:42 UTC (rev 15089)
@@ -185,12 +185,18 @@
#ifdef HAVE_LC_MESSAGES
locale = g_strdup(setlocale(LC_MESSAGES, NULL));
#else
+# ifdef G_OS_WIN32
+ /* On win32, setlocale() doesn't say anything useful. Use
+ glib's function instead. */
+ locale = g_strdup( *g_get_language_names() );
+# else
/*
* Mac OS X 10.1 and earlier, not only doesn't have LC_MESSAGES
* setlocale can sometimes return NULL instead of "C"
*/
locale = g_strdup(setlocale(LC_ALL, NULL) ?
setlocale(LC_ALL, NULL) : "C");
+# endif
#endif
i = strlen(locale);
More information about the gnucash-changes
mailing list