Added condition and fallback to LC_CTYPE if system doesn't define

2001-03-11  Timur Bakeyev  <timur@gnu.org>

	* 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
This commit is contained in:
Timur Bakeyev
2001-03-11 22:28:21 +00:00
committed by Timur I. Bakeyev
parent 1a742ad81e
commit ef9df95977

View File

@ -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) {