|  |  |  | GNOME Desktop Library Reference Manual | |
|---|---|---|---|---|
| Top | Description | ||||
char ** gnome_get_all_locales (void); char * gnome_get_country_from_code (const char *code,const char *translation); char * gnome_get_country_from_locale (const char *locale,const char *translation); gboolean gnome_get_input_source_from_locale (const char *locale,const char **type,const char **id); char * gnome_get_language_from_code (const char *code,const char *translation); char * gnome_get_language_from_locale (const char *locale,const char *translation); char * gnome_normalize_locale (const char *locale); gboolean gnome_parse_locale (const char *locale,char **language_codep,char **country_codep,char **codesetp,char **modifierp); gboolean gnome_language_has_translations (const char *code);
char **             gnome_get_all_locales               (void);
Gets all locales.
| Returns : | a newly allocated NULL-terminated string array containing the
all locales. Free withg_strfreev(). [array zero-terminated=1][element-type utf8][transfer full] | 
Since 3.8
char * gnome_get_country_from_code (const char *code,const char *translation);
Gets the country name for code. If locale is provided the
returned string is translated accordingly.
| 
 | an ISO 3166 code string | 
| 
 | a locale string. [allow-none] | 
| Returns : | the country name. Caller takes ownership. [transfer full] | 
Since 3.8
char * gnome_get_country_from_locale (const char *locale,const char *translation);
Gets the country description for locale. If translation is
provided the returned string is translated accordingly.
| 
 | a locale string | 
| 
 | a locale string. [allow-none] | 
| Returns : | the country description. Caller takes ownership. [transfer full] | 
Since 3.8
gboolean gnome_get_input_source_from_locale (const char *locale,const char **type,const char **id);
Gets the default input source's type and identifier for a given locale.
| 
 | a locale string | 
| 
 | location to store the input source type. [out][transfer none] | 
| 
 | location to store the input source identifier. [out][transfer none] | 
| Returns : | TRUEif a input source exists orFALSEotherwise. | 
Since 3.8
char * gnome_get_language_from_code (const char *code,const char *translation);
Gets the language name for code. If locale is provided the
returned string is translated accordingly.
| 
 | an ISO 639 code string | 
| 
 | a locale string. [allow-none] | 
| Returns : | the language name. Caller takes ownership. [transfer full] | 
Since 3.8
char * gnome_get_language_from_locale (const char *locale,const char *translation);
Gets the language description for locale. If translation is
provided the returned string is translated accordingly.
| 
 | a locale string | 
| 
 | a locale string. [allow-none] | 
| Returns : | the language description. Caller takes ownership. [transfer full] | 
Since 3.8
char *              gnome_normalize_locale              (const char *locale);
Gets the normalized locale string in the form
[language[_country][.codeset][modifier]] for name.
| 
 | a locale string | 
| Returns : | normalized locale string. Caller takes ownership. [transfer full] | 
Since 3.8
gboolean gnome_parse_locale (const char *locale,char **language_codep,char **country_codep,char **codesetp,char **modifierp);
Extracts the various components of a locale string of the form
[language[_country][.codeset][modifier]]. See
http://en.wikipedia.org/wiki/Locale.
| 
 | a locale string | 
| 
 | location to
store the language code, or NULL. [out][allow-none][transfer full] | 
| 
 | location to
store the country code, or NULL. [out][allow-none][transfer full] | 
| 
 | location to
store the codeset, or NULL. [out][allow-none][transfer full] | 
| 
 | location to
store the modifier, or NULL. [out][allow-none][transfer full] | 
| Returns : | TRUEif parsing was successful. | 
Since 3.8