unic-langid Build Status Coverage Status

unic-langid is an API for managing Unicode Language Identifiers.

The crate provides a way to create a struct from a string, manipulate its fields, canonicalize it, and serialize into a string.

Usage

```rust use unic_langid::LanguageIdentifier;

let loc = LanguageIdentifier::from_str("en-US");

asserteq!(loc.getlanguage(), "en"); asserteq!(loc.getscript(), None); asserteq!(loc.getregion(), Some("US"));

loc.set_script(Some("Latn"));

asserteq!(&loc.tostring(), "en-Latn-US"); ```

Status

The crate is providing fundamental blocks, but is very basic.

Get Involved

unic-langid is open-source, licensed under the Apache License, Version 2.0. We encourage everyone to take a look at our code and we'll listen to your feedback.