glib.Internationalization.Internationalization Class Reference

List of all members.

Detailed Description

Description GLib doesn't force any particular localization method upon its users.

But since GLib itself is localized using the gettext() mechanism, it seems natural to offer the de-facto standard gettext() support macros in an easy-to-use form. In order to use these macros in an application, you must include glib/gi18n.h. For use in a library, must include glib/gi18n-lib.h after defining the GETTEXT_PACKAGE macro suitably for your library: define GETTEXT_PACKAGE "gtk20" include <glib/gi18n-lib.h>

Static Public Member Functions

static char[] stripContext (char[] msgid, char[] msgval)
 An auxiliary function for gettext() support (see Q_()).
static char ** getLanguageNames ()
 Computes a list of applicable locale names, which can be used to e.g.

Member Function Documentation

static char** glib.Internationalization.Internationalization.getLanguageNames (  )  [static]

Computes a list of applicable locale names, which can be used to e.g.

construct locale-dependent filenames or search paths. The returned list is sorted from most desirable to least desirable and always contains the default locale "C". For example, if LANGUAGE=de:en_US, then the returned list is "de", "en_US", "en", "C". This function consults the environment variables LANGUAGE, LC_ALL, LC_MESSAGES and LANG to find the list of locales specified by the user. Returns: a NULL-terminated array of strings owned by GLib that must not be modified or freed. Since 2.6 See Also The gettext manual.

static char [] glib.Internationalization.Internationalization.stripContext ( char[]  msgid,
char[]  msgval 
) [static]

An auxiliary function for gettext() support (see Q_()).

msgid: a string msgval: another string Returns: msgval, unless msgval is identical to msgid and contains a '|' character, in which case a pointer to the substring of msgid after the first '|' character is returned. Since 2.4 Logo Logo Logo