1 unstable release
| 0.1.0 | Jan 9, 2024 |
|---|
#251 in Internationalization (i18n)
256 downloads per month
53KB
1.5K
SLoC
unicode-locale-parser
The parser for Unicode Locale Identifiers
⛏️ Conformance
All code implements of Unicode UTS #35 Language and Locale Identifiers.
🚀 Usages
use unicode_locale_parser::parse_locale_id;
fn main() {
// simple language
let locale = parse_locale_id("ja-JP");
println!("{:#?}", locale);
// language & unicode locale extension
let locale = parse_locale_id("de-Latn-DE-u-ca-buddhist");
println!("{:#?}", locale);
}
🤝 API
parse_locale_id: parseunicode_locale_idparse_language_id: parseunicode_language_idparse_subdivision_id: parseunicode_subdivision_idparse_measure_unit: parseunicode_measure_unit
✅ TODO
- Locale Id Canonicalization
- Split some packages with Cargo workspace
- Performance
- should optimize for string processor with using like
TinyStr
- should optimize for string processor with using like
- Add more convenient manipulation API for Locale
- Some Trait implementation
Eq,Clone,Default,Hash,PartialOrdandOrd