Commit 663f577f authored by Dom Lachowicz's avatar Dom Lachowicz

more robust way of getting your locale

parent 52828443
2005-10-21 Dom Lachowicz <cinamod@hotmail.com>
* rsvg-cond.c: More robust way of getting your language
2005-10-22 Caleb Moore <c.moore@student.unsw.edu.au>
* a_lot_of_places: implemented a system of late normalizations of lengths. Now used in masks and svgs
......
......@@ -134,14 +134,22 @@ rsvg_cond_parse_system_language (const char * value)
permitted = FALSE;
#if defined(G_OS_WIN32)
locale = g_win32_getlocale ();
#elif defined(HAVE_LC_MESSAGES)
locale = g_strdup (setlocale (LC_MESSAGES, NULL));
#else
/* catch-all */
locale = g_strdup (setlocale (LC_ALL, NULL));
if(!locale)
locale = g_win32_getlocale ();
#endif
#if defined(HAVE_LC_MESSAGES)
if(!locale)
locale = g_strdup (setlocale (LC_MESSAGES, NULL));
#endif
if(!locale)
locale = g_strdup (setlocale (LC_ALL, NULL));
/* catch-all */
if(!locale)
locale = g_strdup (g_getenv ("LANG"));
if (locale)
{
for(i = 0; (i < nb_elems) && !permitted; i++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment