aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorTimur Bakeyev <timur@gnu.org>2001-03-12 06:28:21 +0800
committerTimur I. Bakeyev <timur@src.gnome.org>2001-03-12 06:28:21 +0800
commitef9df95977647014c1b47e01c1e884db7341fc9c (patch)
tree831af9b576debd8dd5ff45674431291f05824610 /e-util
parent1a742ad81e131dad9d71ecf36f98f54d5585cdd4 (diff)
downloadgsoc2013-evolution-ef9df95977647014c1b47e01c1e884db7341fc9c.tar
gsoc2013-evolution-ef9df95977647014c1b47e01c1e884db7341fc9c.tar.gz
gsoc2013-evolution-ef9df95977647014c1b47e01c1e884db7341fc9c.tar.bz2
gsoc2013-evolution-ef9df95977647014c1b47e01c1e884db7341fc9c.tar.lz
gsoc2013-evolution-ef9df95977647014c1b47e01c1e884db7341fc9c.tar.xz
gsoc2013-evolution-ef9df95977647014c1b47e01c1e884db7341fc9c.tar.zst
gsoc2013-evolution-ef9df95977647014c1b47e01c1e884db7341fc9c.zip
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
Diffstat (limited to 'e-util')
-rw-r--r--e-util/e-xml-utils.c4
1 files changed, 4 insertions, 0 deletions
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) {