Package: pango

Function pango-language-matches

Lambda List

pango-language-matches (language range-list)

Arguments

language -- a pango-language tag
range-list -- a list of language ranges, separated by ';', ':', ',', or space characters, each element must either be '*', or a RFC 3066 language range canonicalized as by the function pango-language-from-string

Return Value

True if a match was found.

Details

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 '-'.

Examples

(pango-language-matches (pango-language-default) "de-de en-gb") => T
(pango-language-matches (pango-language-default) "en-gb") => NIL    
 

See also

2020-12-4