rfc5646LanguageTag top-level property
final
The Language Tag syntax as defined in RFC 5646.
Language tags can match one of the following rules:
langtagprivateusegrandfathered
Implementation
final rfc5646LanguageTag = grammar(
'RFC5646 Language Tag',
rule(
'Language-Tag',
alternatives([
// grandfathered tags are explicitly listed and can map to a `langtag`
// so we check them before `langtag`
rfc5646grandfathered,
// private use tags start with 'x' so check this next
rfc5646privateuse,
rfc5646langtag,
]),
),
);