1 unstable release

0.1.0 Jan 9, 2024

#132 in Internationalization (i18n)

Download history 5/week @ 2024-01-03 2/week @ 2024-02-21 12/week @ 2024-02-28 4/week @ 2024-03-27 10/week @ 2024-04-03 1/week @ 2024-04-10 37/week @ 2024-04-17

52 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