Method

PangoLanguagematches

Declaration [src]

gboolean
pango_language_matches (
  PangoLanguage* language,
  const char* range_list
)

Description [src]

Checks if a language tag matches one of the elements in a list of language ranges.

A language tag is considered to match a range in the list if the range is ‘*’, the range is exactly the tag, or the range is a prefix of the tag, and the character after it in the tag is ‘-‘.

Parameters

language

Type: PangoLanguage

A language tag (see pango_language_from_string()), NULL is allowed and matches nothing but ‘*’.

The argument can be NULL.
range_list

Type: const char*

A list of language ranges, separated by ‘;’, ‘:’, ‘,’, or space characters. Each element must either be ‘*’, or a RFC 3066 language range canonicalized as by pango_language_from_string().

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

Return value

Type: gboolean

TRUE if a match was found.