#include <gnome.h> #define _ (String) #define N_ (String) #define textdomain (String) #define gettext (String) #define dgettext (Domain,Message) #define dcgettext (Domain,Message,Type) #define bindtextdomain (Domain,Directory) const char* gnome_i18n_get_language (void); |
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
#define _(String) |
Use this to tag strings in an executable path, this macro expands to gettext() or dgettext() if the application supports internationalization.
#define N_(String) |
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.
const char* gnome_i18n_get_language (void); |
Returns current language (contents of "LANG" environment variable).
|
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.
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.
const char* gnome_i18n_get_preferred_language (void); |