Crate locale-types

travis.ci crates.io docs.rs Minimum Rust Version mit License GitHub stars

This crate provides a Locale enumeration, LocaleIdentifier trait, and a LocaleString structure are provided that may be used to parse and construct locale identifiers in a standards-conformant manner.

It is used by the locale-codes and locale-settings crates.

Example

```rust use locale_types::{LocaleIdentifier, LocaleString};

let locale = LocaleString::new("en".tostring()).unwrap() .withterritory("US".tostring()).unwrap() .withcodeset("UTF-8".tostring()).unwrap() .withmodifier("collation=pinyin;currency=CNY".tostring()).unwrap(); println!("{}", locale); ```

History