Description
This module allows the programmer to internationalize his application
by providing a number macros that can be used to tag his texts and
some functions that control the internationalization of the
application or library.
All of the function in this module do either map to an empty action if
the ENABLE_NLS macro is not defined or to actual
functions if it is defined.
See the Info gettext for
more information on internationalization issues.
Details
_()
Use this to tag strings in an executable path, this macro expands to
gettext() or dgettext() if the application supports
internationalization.
N_()
This macro is just an identity macro, the only purpose of this macros
is to allow gettext to identify the string as a
translatable message. This macro can be used in static initializers,
while the _() macros can not be used.
textdomain()
# define textdomain(String) (String) |
gettext()
# define gettext(String) (String) |
dgettext()
# define dgettext(Domain,Message) (Message) |
dcgettext()
# define dcgettext(Domain,Message,Type) (Message) |
bindtextdomain()
# define bindtextdomain(Domain,Directory) (Domain) |
gnome_i18n_get_language ()
const char* gnome_i18n_get_language (void); |
Returns current language (contents of "LANG" environment variable).
gnome_i18n_get_language_list ()
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.
If category_name is NULL, then LC_ALL is assumed.
gnome_i18n_set_preferred_language ()
void gnome_i18n_set_preferred_language
(const char *val); |
This sets the user's preferred language in the Gnome config
database. This value can always be overridden by the standard
environment variables. It exists so that a config applet which
chooses the preferred language has a standard place to put the
resulting information.
gnome_i18n_get_preferred_language ()
const char* gnome_i18n_get_preferred_language
(void); |
gnome_i18n_init ()
void gnome_i18n_init (void); |
Initialize the i18n environment variables (if not already set) from
the Gnome config database. Ordinarily this should not be called by
user code.