isWellFormedBCP47 property
bool
get
isWellFormedBCP47
Check if the locale is well-formed BCP47 language tag
It must either be:
- a normal language tag (fitting the BCP47 ABNF); or
- a grandfathered tag; or
- a private use tag (starting with x-).
Implementation
bool get isWellFormedBCP47 =>
(isWellFormed && lang != null) ||
isGrandfatheredIrregular ||
isWellFormedPrivateUse;