Skip to main content

data_locale

Macro data_locale 

Source
macro_rules! data_locale {
    ($locale:literal) => { ... };
}
Expand description

A macro allowing for compile-time construction of valid DataLocales.

The macro will perform syntax normalization of the tag.

ยงExamples

use icu::locale::{DataLocale, data_locale};

const DE_AT: DataLocale = data_locale!("de-at");

let de_at: DataLocale = "de-at".parse().unwrap();

assert_eq!(DE_AT, de_at);