#include "format.h"
#include "value.h"
#include "xalloc.h"
-#include <libpspp/i18n.h>
#include <libpspp/integer-format.h>
#include <libpspp/message.h>
{
init_viewport (width, length);
settings_set_epoch (-1);
- i18n_init ();
the_settings.styles = fmt_create ();
settings_set_decimal_char (get_system_decimal ());
settings_done (void)
{
fmt_done (the_settings.styles);
- i18n_done ();
}
/* Returns the floating-point format used for RB and RBHEX
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#include <libintl.h>
#include <iconv.h>
#include <errno.h>
#include "assertion.h"
#include "i18n.h"
+#include "version.h"
+
#include <localcharset.h>
#include "xstrndup.h"
void
i18n_init (void)
{
- free (default_encoding);
+#if ENABLE_NLS
+ setlocale (LC_CTYPE, "");
+#if HAVE_LC_MESSAGES
+ setlocale (LC_MESSAGES, "");
+#endif
+#if HAVE_LC_PAPER
+ setlocale (LC_PAPER, "");
+#endif
+ bindtextdomain (PACKAGE, locale_dir);
+ textdomain (PACKAGE);
+#endif /* ENABLE_NLS */
+
+ assert (default_encoding == NULL);
default_encoding = strdup (locale_charset ());
hmapx_init (&map);
set_program_name (argv[0]);
+ gtk_disable_setlocale ();
+
if ( ! gtk_parse_args (&argc, &argv) )
{
perror ("Error parsing arguments");
#include <config.h>
-#include <locale.h>
+#include <libpspp/i18n.h>
#include <assert.h>
#include <libintl.h>
#include <gsl/gsl_errno.h>
{
PsppireDict *dictionary = 0;
- /* gtk_init messes with the locale.
- So unset the bits we want to control ourselves */
- setlocale (LC_NUMERIC, "C");
-
- bindtextdomain (PACKAGE, locale_dir);
+ i18n_init ();
preregister_widgets ();
message_dialog_done ();
settings_done ();
outp_done ();
+ i18n_done ();
}
#include <config.h>
-#include <locale.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <ieeefp.h>
#endif
+
+#include <libpspp/i18n.h>
#include <data/dictionary.h>
#include <data/file-handle-def.h>
#include <libpspp/getl.h>
#define _(msgid) gettext (msgid)
-static void i18n_init (void);
static void fpu_init (void);
static void clean_up (void);
return any_errors ();
}
\f
-static void
-i18n_init (void)
-{
-#if ENABLE_NLS
-#if HAVE_LC_MESSAGES
- setlocale (LC_MESSAGES, "");
-#endif
-#if HAVE_LC_PAPER
- setlocale (LC_PAPER, "");
-#endif
- bindtextdomain (PACKAGE, locale_dir);
- textdomain (PACKAGE);
-#endif /* ENABLE_NLS */
-}
-
static void
fpu_init (void)
{
readln_uninitialize ();
outp_done ();
msg_ui_done ();
+ i18n_done ();
}
}