gnome-i18n

Name

gnome-i18n -- 

Synopsis


#include <libgnome/libgnome.h>


#define     BONOBO_EXPLICIT_TRANSLATION_DOMAIN
const GList* gnome_i18n_get_language_list   (const gchar *category_name);
void        gnome_i18n_push_c_numeric_locale
                                            (void);
void        gnome_i18n_pop_c_numeric_locale (void);

Description

Details

BONOBO_EXPLICIT_TRANSLATION_DOMAIN

#  define BONOBO_EXPLICIT_TRANSLATION_DOMAIN GNOME_EXPLICIT_TRANSLATION_DOMAIN


gnome_i18n_get_language_list ()

const GList* gnome_i18n_get_language_list   (const gchar *category_name);

This computes a list of language strings. It searches in the standard environment variables to find the list, which is sorted in order from most desirable to least desirable. The `C' locale is appended to the list if it does not already appear (other routines depend on this behaviour). If category_name is NULL, then LC_ALL is assumed.

category_name : Name of category to look up, e.g. "LC_MESSAGES".
Returns : the list of languages, this list should not be freed as it is owned by gnome-i18n


gnome_i18n_push_c_numeric_locale ()

void        gnome_i18n_push_c_numeric_locale
                                            (void);

Saves the current LC_NUMERIC locale and sets it to "C" This way you can safely read write flaoting point numbers all in the same format. You should make sure that code between gnome_i18n_push_c_numeric_locale and gnome_i18n_pop_c_numeric_locale doesn't do any setlocale calls or locale may end up in a strange setting. Also make sure to always pop the c numeric locale after you've pushed it. The calls can be nested.


gnome_i18n_pop_c_numeric_locale ()

void        gnome_i18n_pop_c_numeric_locale (void);

Restores the LC_NUMERIC locale to what it was before the matching gnome_i18n_pop_c_numeric_locale. If these calls were nested, then this is a no-op until we get to the most outermost layer. Code in between these should not do any setlocale calls to change the LC_NUMERIC locale or things may come out very strange.