|
mate-desktop 1.29.2
Library with common API for various MATE modules
|
#include "config.h"#include <stdlib.h>#include <stdio.h>#include <unistd.h>#include <string.h>#include <errno.h>#include <dirent.h>#include <locale.h>#include <langinfo.h>#include <sys/stat.h>#include <glib.h>#include <glib/gi18n.h>#include <glib/gstdio.h>#include "mate-languages.h"Data Structures | |
| struct | _MateLocale |
Macros | |
| #define | MATE_DESKTOP_USE_UNSTABLE_API |
| #define | __LC_LAST 13 |
| #define | ISO_CODES_DATADIR ISO_CODES_PREFIX "/share/xml/iso-codes" |
| #define | ISO_CODES_LOCALESDIR ISO_CODES_PREFIX "/share/locale" |
Typedefs | |
| typedef struct _MateLocale | MateLocale |
Functions | |
| static char * | construct_language_name (const char *language, const char *territory, const char *codeset, const char *modifier) |
| static void | mate_locale_free (MateLocale *locale) |
| static char * | normalize_codeset (const char *codeset) |
| gboolean | mate_parse_locale (const char *locale, char **language_codep, char **country_codep, char **codesetp, char **modifierp) |
| mate_parse_locale: @locale: a locale string @language_codep: (out) (allow-none) (transfer full): location to store the language code, or NULL @country_codep: (out) (allow-none) (transfer full): location to store the country code, or NULL @codesetp: (out) (allow-none) (transfer full): location to store the codeset, or NULL @modifierp: (out) (allow-none) (transfer full): location to store the modifier, or NULL | |
. | |
mate_normalize_locale: @locale: a locale string Gets the normalized locale string in the form [language[_country][.codeset][@modifier]] for Return value: (transfer full): normalized locale string. Caller takes ownership. Since: 1.22 | |
| static gboolean | language_name_is_valid (const char *language_name) |
| char * | mate_normalize_locale (const char *locale) |
| static void | language_name_get_codeset_details (const char *language_name, char **pcodeset, gboolean *is_utf8) |
| static gboolean | locale_dir_has_mo_files (const gchar *path) |
Variables | |
| static GHashTable * | mate_languages_map |
| static GHashTable * | mate_territories_map |
| static GHashTable * | mate_available_locales_map |
| static GHashTable * | mate_language_count_map |
| static GHashTable * | mate_territory_count_map |
| #define __LC_LAST 13 |
| #define ISO_CODES_DATADIR ISO_CODES_PREFIX "/share/xml/iso-codes" |
| #define ISO_CODES_LOCALESDIR ISO_CODES_PREFIX "/share/locale" |
| #define MATE_DESKTOP_USE_UNSTABLE_API |
| typedef struct _MateLocale MateLocale |
|
static |
Referenced by mate_normalize_locale(), and mate_parse_locale().
|
static |
|
static |
Referenced by mate_parse_locale().
|
static |
|
static |
| char * mate_normalize_locale | ( | const char * | locale | ) |
References construct_language_name(), and mate_parse_locale().
Referenced by test_one_locale().
| gboolean mate_parse_locale | ( | const char * | locale, |
| char ** | language_codep, | ||
| char ** | country_codep, | ||
| char ** | codesetp, | ||
| char ** | modifierp | ||
| ) |
mate_parse_locale: @locale: a locale string @language_codep: (out) (allow-none) (transfer full): location to store the language code, or NULL @country_codep: (out) (allow-none) (transfer full): location to store the country code, or NULL @codesetp: (out) (allow-none) (transfer full): location to store the codeset, or NULL @modifierp: (out) (allow-none) (transfer full): location to store the modifier, or NULL
Extracts the various components of a locale string of the form [language[_country][.codeset][@modifier]]. See http://en.wikipedia.org/wiki/Locale.
Return value: TRUE if parsing was successful.
Since: 1.22
References construct_language_name(), language_name_is_valid(), and normalize_codeset().
Referenced by mate_normalize_locale(), and test_one_locale().
|
static |
Referenced by language_name_get_codeset_details(), and mate_parse_locale().
|
static |
|
static |
|
static |
|
static |
|
static |