Commit 84a07d46 authored by Dom Lachowicz's avatar Dom Lachowicz

more smarts about getting the user's language

parent 5089f856
......@@ -136,23 +136,22 @@ rsvg_cond_parse_system_language (const char * value)
#if defined(G_OS_WIN32)
if(!locale)
locale = g_win32_getlocale ();
#endif
#endif
if(!locale)
locale = g_strdup (g_getenv ("LANG"));
#if defined(HAVE_LC_MESSAGES)
if(!locale)
locale = g_strdup (setlocale (LC_MESSAGES, NULL));
#endif
if(!locale)
locale = g_strdup (g_getenv ("LANG"));
/* catch-all */
if(!locale) {
locale = g_strdup (setlocale (LC_ALL, NULL));
if(locale && strcmp(locale, "C") == 0) {
g_free(locale);
locale = g_strdup("en");
}
if(!locale || strcmp(locale, "C") == 0) {
g_free(locale);
locale = g_strdup("en");
}
if (locale)
......
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