Releases: rspeer/langcodes
Version 3.3
Version 3.3 (November 2021)
-
Updated to CLDR v40.
-
Updated the IANA subtag registry to version 2021-08-06.
-
Bug fix: recognize script codes that appear in the IANA registry even if
they're missing from CLDR for some reason. 'cu-Cyrs' is valid, for example. -
Switched the build system from
setuptools
topoetry
.
v3.2.1
v3.2.0
-
Added the top-level function
tag_is_valid(tag)
, for determining if a string
is a valid language tag without having to parse it first. -
Added the top-level function
closest_supported_match(desired, supported)
,
which is similar toclosest_match
but with a simpler return value. It
returns the language tag of the closest match, or None if no match is close
enough. -
Bug fix: a lot of well-formed but invalid language codes appeared to be
valid, such as 'aaj' or 'en-Latnx', because the regex could match a prefix of
a subtag. The validity regex is now required to match completely. -
Bug fixes that address some edge cases of validity:
- A language tag that is entirely private use, like 'x-private', is valid
- A language tag that uses the same extension twice, like 'en-a-bbb-a-ccc', is invalid
- A language tag that uses the same variant twice, like 'de-1901-1901', is invalid
- A language tag with two extlangs, like 'sgn-ase-bfi', is invalid
-
Updated dependencies so they are compatible with Python 3.10.