Function

MateDesktopparse_locale

since: 1.22

Declaration [src]

gboolean
mate_parse_locale (
  const char* locale,
  char** language_codep,
  char** country_codep,
  char** codesetp,
  char** modifierp
)

Description [src]

Extracts the various components of a locale string of the form [language[_country][.codeset][modifier]]. See http://en.wikipedia.org/wiki/Locale.

Available since: 1.22

Parameters

locale

Type: const char*

A locale string.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
language_codep

Type: char**

Location to store the language code, or NULL.

The argument will be set by the function.
The argument can be NULL.
The caller of the function takes ownership of the data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.
country_codep

Type: char**

Location to store the country code, or NULL.

The argument will be set by the function.
The argument can be NULL.
The caller of the function takes ownership of the data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.
codesetp

Type: char**

Location to store the codeset, or NULL.

The argument will be set by the function.
The argument can be NULL.
The caller of the function takes ownership of the data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.
modifierp

Type: char**

Location to store the modifier, or NULL.

The argument will be set by the function.
The argument can be NULL.
The caller of the function takes ownership of the data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.

Return value

Type: gboolean

TRUE if parsing was successful.