summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Evins <evins@snaught.com>2010-05-20 22:19:43 -0400
committerJim Evins <evins@snaught.com>2010-05-20 22:19:43 -0400
commit441e11199b08371b19cb7aaa15021cf8dd084a99 (patch)
treee8fd00856ad264f57969b545250138a8b65970c6
parent13bd060910ad5426e18311ce40ee7da15f1797a6 (diff)
Fix locale problem with glabels-batch.
For some reason, the locale is never set from the environment when calling gnome_program_init(...LIBGNOME_MODULE...), so it defaults to "C". It does however get set properly when calling gnome_program_ini(...LIGNOMEUI_MODULE...) as in glabels.c.
-rw-r--r--src/glabels-batch.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/glabels-batch.c b/src/glabels-batch.c
index 41ebf9d..1c79f9a 100644
--- a/src/glabels-batch.c
+++ b/src/glabels-batch.c
@@ -26,6 +26,7 @@
#include <glib/gi18n.h>
#include <libgnome/libgnome.h>
+#include <locale.h>
#include "merge-init.h"
#include "xml-label.h"
@@ -89,6 +90,8 @@ main (int argc, char **argv)
glPrintOp *print_op;
gchar *utf8_filename;
+ setlocale(LC_ALL, "");
+
bindtextdomain (GETTEXT_PACKAGE, GLABELS_LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);