[glabels/glabels_2_2] Fix locale problem with glabels-batch.



commit 441e11199b08371b19cb7aaa15021cf8dd084a99
Author: Jim Evins <evins snaught com>
Date:   Thu May 20 22:19:43 2010 -0400

    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.

 src/glabels-batch.c |    3 +++
 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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]