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:

committed by
Timur I. Bakeyev

parent
1a742ad81e
commit
ef9df95977
@ -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) {
|
||||
|
Reference in New Issue
Block a user