#include <goffice/goffice-config.h>
#include "go-locale.h"
#include <glib/gi18n-lib.h>
#include <string.h>
Defines | |
#define | FREE1(var) if (var) { g_string_free (var, TRUE); var = NULL; } |
Functions | |
char const * | go_setlocale (int category, char const *val) |
void | _go_locale_shutdown (void) |
static void | convert1 (GString *res, char const *lstr, char const *name, char const *def) |
static void | update_lc (void) |
GString const * | go_locale_get_decimal (void) |
GString const * | go_locale_get_thousand (void) |
GString const * | go_locale_get_currency (gboolean *precedes, gboolean *space_sep) |
go_locale_get_currency : : a pointer to a boolean which is set to TRUE if the currency should precede : a pointer to a boolean which is set to TRUE if the currency should have a space separating it from the the value | |
GString const * | go_locale_get_date_format (void) |
GString const * | go_locale_get_time_format (void) |
int | go_locale_month_before_day (void) |
gboolean | go_locale_24h (void) |
go_locale_24h : | |
char | go_locale_get_arg_sep (void) |
char | go_locale_get_col_sep (void) |
char | go_locale_get_row_sep (void) |
char const * | go_locale_boolean_name (gboolean b) |
void | go_locale_untranslated_booleans (void) |
go_locale_untranslated_booleans : | |
Variables | |
static gboolean | locale_info_cached = FALSE |
static GString * | lc_decimal = NULL |
static GString * | lc_thousand = NULL |
static gboolean | lc_precedes |
static gboolean | lc_space_sep |
static GString * | lc_currency = NULL |
static gboolean | date_format_cached = FALSE |
static GString * | lc_date_format = NULL |
static gboolean | time_format_cached = FALSE |
static GString * | lc_time_format = NULL |
static gboolean | date_order_cached = FALSE |
static gboolean | locale_is_24h_cached = FALSE |
static gboolean | boolean_cached = FALSE |
static char const * | lc_TRUE = NULL |
static char const * | lc_FALSE = NULL |
#define FREE1 | ( | var | ) | if (var) { g_string_free (var, TRUE); var = NULL; } |
Referenced by _go_locale_shutdown().
void _go_locale_shutdown | ( | void | ) |
References FREE1, go_setlocale(), lc_currency, lc_date_format, lc_decimal, lc_thousand, lc_time_format, and locale_info_cached.
static void convert1 | ( | GString * | res, | |
char const * | lstr, | |||
char const * | name, | |||
char const * | def | |||
) | [static] |
Referenced by update_lc().
gboolean go_locale_24h | ( | void | ) |
go_locale_24h :
Returns: TRUE if the locale uses a 24h clock, FALSE otherwise.
References go_locale_get_time_format(), and locale_is_24h_cached.
char const* go_locale_boolean_name | ( | gboolean | b | ) |
References _, boolean_cached, lc_FALSE, and lc_TRUE.
Referenced by go_object_set_property().
char go_locale_get_arg_sep | ( | void | ) |
References go_locale_get_decimal().
Referenced by cb_graph_dim_editor_update().
char go_locale_get_col_sep | ( | void | ) |
References go_locale_get_decimal().
Referenced by cb_graph_dim_editor_update().
GString const* go_locale_get_currency | ( | gboolean * | precedes, | |
gboolean * | space_sep | |||
) |
go_locale_get_currency : : a pointer to a boolean which is set to TRUE if the currency should precede : a pointer to a boolean which is set to TRUE if the currency should have a space separating it from the the value
Play with the default logic so that things come out nicely for the default case.
Returns: A string with the default currency
References lc_currency, lc_precedes, lc_space_sep, locale_info_cached, and update_lc().
GString const* go_locale_get_date_format | ( | void | ) |
References date_format_cached, and lc_date_format.
GString const* go_locale_get_decimal | ( | void | ) |
References lc_decimal, locale_info_cached, and update_lc().
Referenced by go_locale_get_arg_sep(), and go_locale_get_col_sep().
char go_locale_get_row_sep | ( | void | ) |
GString const* go_locale_get_thousand | ( | void | ) |
References lc_thousand, locale_info_cached, and update_lc().
GString const* go_locale_get_time_format | ( | void | ) |
References lc_time_format, s, and time_format_cached.
Referenced by go_locale_24h().
int go_locale_month_before_day | ( | void | ) |
References date_order_cached.
void go_locale_untranslated_booleans | ( | void | ) |
go_locale_untranslated_booleans :
Short circuit the current locale so that we can import files and still produce error messages in the current LC_MESSAGE
References boolean_cached, lc_FALSE, and lc_TRUE.
char const* go_setlocale | ( | int | category, | |
char const * | val | |||
) |
static void update_lc | ( | void | ) | [static] |
References convert1(), lc_currency, lc_decimal, lc_precedes, lc_space_sep, lc_thousand, and locale_info_cached.
Referenced by go_locale_get_currency(), go_locale_get_decimal(), and go_locale_get_thousand().
gboolean boolean_cached = FALSE [static] |
Referenced by go_locale_boolean_name(), go_locale_untranslated_booleans(), and go_setlocale().
gboolean date_format_cached = FALSE [static] |
Referenced by go_locale_get_date_format(), and go_setlocale().
gboolean date_order_cached = FALSE [static] |
Referenced by go_locale_month_before_day(), and go_setlocale().
GString* lc_currency = NULL [static] |
Referenced by _go_locale_shutdown(), go_locale_get_currency(), and update_lc().
GString* lc_date_format = NULL [static] |
Referenced by _go_locale_shutdown(), and go_locale_get_date_format().
GString* lc_decimal = NULL [static] |
Referenced by _go_locale_shutdown(), go_locale_get_decimal(), and update_lc().
char const* lc_FALSE = NULL [static] |
Referenced by go_locale_boolean_name(), and go_locale_untranslated_booleans().
gboolean lc_precedes [static] |
Referenced by go_locale_get_currency(), and update_lc().
gboolean lc_space_sep [static] |
Referenced by go_locale_get_currency(), and update_lc().
GString* lc_thousand = NULL [static] |
Referenced by _go_locale_shutdown(), go_locale_get_thousand(), and update_lc().
GString* lc_time_format = NULL [static] |
Referenced by _go_locale_shutdown(), and go_locale_get_time_format().
char const* lc_TRUE = NULL [static] |
Referenced by go_locale_boolean_name(), and go_locale_untranslated_booleans().
gboolean locale_info_cached = FALSE [static] |
gboolean locale_is_24h_cached = FALSE [static] |
Referenced by go_locale_24h(), and go_setlocale().
gboolean time_format_cached = FALSE [static] |
Referenced by go_locale_get_time_format(), and go_setlocale().