Normalize a BCP 47 language tag
bcp_normalize.RdApplies the canonicalization rules from RFC 5646: preferred values are substituted for deprecated subtags, default scripts are suppressed, and each component is cased according to convention (language lower-case, script title-case, region upper-case).
Arguments
- tag
A character scalar BCP 47 language tag.
- registry
A data frame of the IANA Language Subtag Registry, as returned by
bcp_process_registry(). Defaults to the locally cached registry, falling back to the bundled snapshot if no cache exists.