1 unstable release

0.1.0 Jan 9, 2024

#223 in Internationalization (i18n)

Download history 68/week @ 2024-08-18 29/week @ 2024-08-25 128/week @ 2024-09-01 116/week @ 2024-09-08 120/week @ 2024-09-15 200/week @ 2024-09-22 121/week @ 2024-09-29 74/week @ 2024-10-06 124/week @ 2024-10-13 73/week @ 2024-10-20 78/week @ 2024-10-27 77/week @ 2024-11-03 149/week @ 2024-11-10

381 downloads per month

MIT license

53KB
1.5K SLoC

unicode-locale-parser

CI

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

✅ TODO

  • Locale Id Canonicalization
  • Split some packages with Cargo workspace
  • Performance
    • should optimize for string processor with using like TinyStr
  • Add more convenient manipulation API for Locale
  • Some Trait implementation
    • Eq, Clone, Default, Hash, PartialOrd and Ord

©️ License

MIT

No runtime deps