use-locale-tag
Small BCP 47 / Unicode-style locale tag parsing and normalization primitives for RustUse.
Example
use ;
let tag = parse_locale_tag.unwrap;
assert_eq!;
assert_eq!;
Scope
- Parse locale tags with language, optional script, optional region, and supported suffixes.
- Normalize language subtags to lowercase.
- Normalize script subtags to title case.
- Normalize alphabetic region subtags to uppercase.
- Preserve supported variants, extensions, and private-use suffixes without database canonicalization.
Non-goals
- Full CLDR canonicalization.
- ICU replacement behavior.
- Translation catalogs.
- Message formatting.
- Locale data loading.
License
Licensed under either of the following, at your option:
- Apache License, Version 2.0
- MIT license