From ef9df95977647014c1b47e01c1e884db7341fc9c Mon Sep 17 00:00:00 2001 From: Timur Bakeyev Date: Sun, 11 Mar 2001 22:28:21 +0000 Subject: Added condition and fallback to LC_CTYPE if system doesn't define 2001-03-11 Timur Bakeyev * gal/util/e-xml-utils.c: Added condition and fallback to LC_CTYPE if system doesn't define LC_MESSAGES. Usage of LC_CTYPE to determine language is hackish and questionable, then... Still, gives nice re- sults if there is no other ways to get that value. svn path=/trunk/; revision=8632 --- e-util/e-xml-utils.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'e-util/e-xml-utils.c') diff --git a/e-util/e-xml-utils.c b/e-util/e-xml-utils.c index 3c5fd5f9ee..4f13a616b4 100644 --- a/e-util/e-xml-utils.c +++ b/e-util/e-xml-utils.c @@ -60,7 +60,11 @@ e_xml_get_child_by_name_by_lang (const xmlNode *parent, const xmlChar *child_nam g_return_val_if_fail (child_name != NULL, NULL); if (lang == NULL) { +#ifdef HAVE_LC_MESSAGES lang = setlocale (LC_MESSAGES, NULL); +#else + lang = setlocale (LC_CTYPE, NULL); +#endif } for (child = parent->childs; child != NULL; child = child->next) { if (xmlStrcmp (child->name, child_name) == 0) { -- cgit