macro_rules! language {
    ($language:literal) => { ... };
}
Expand description

A macro allowing for compile-time construction of valid Language subtag.

The macro will perform syntax canonicalization of the tag.

Examples

use icu::locid::{language, subtags::Language};

const DE: Language = language!("DE");

let de: Language = "DE".parse().unwrap();

assert_eq!(DE, "de");
assert_eq!(DE, de);