Name
planguage:Matches -- check if language tag matches language ranges
Synopsis
ok = planguage:Matches(range_list$)
Function
Checks if a language tag matches one of the elements in a list of language ranges. The list of language ranges must be passed as a string, separated by ";", ":", ",", or space characters. Each element must either be "*", or a RFC 3066 language range canonicalized as by pango.Language().

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

This function returns True if a match was found

Inputs
range_list$
a list of language ranges (see above for the format)
Results
ok
True if a match was found, False otherwise

Show TOC