Regular expression matching BCP 47 language tags.
Regular expression matching RFC 4647 basic language ranges.
Checks if a value is a valid language tag.
Checks if a value is a valid basic language range.
Checks if a language tag matches a basic language range.
Names the language identified by a language tag.
Identifies the language a name refers to.
Infers the language of a web page from its address.
Creates a function that transforms every text of a Localised language map.
BCP 47 language tags and RFC 4647 basic language ranges, with language detection and localised text in language maps.
Language Tags
A value can be checked for a well-formed language tag before it reaches an API that expects one:
Basic Language Ranges
A value can be checked in the same way for a well-formed basic language range, wildcard included:
Matching
A tag can be tested against the ranges a client accepts, to select the content that answers a request:
Naming
A tag can be shown to readers as the name of its language, written in a language they understand:
Identifying
A language named in words rather than in a tag can be read as a tag, whatever language the name is written in:
Inferring
The localised versions of a web page can be told apart by the language their address states:
Language Maps
Localised text can be cleaned up in one pass, whether each language carries one label or several:
See