#icu #macros #i18n

dev icu_locid_macros

proc-macros for icu_locid

2 unstable releases

0.2.0 Apr 29, 2021
0.1.0 Oct 15, 2020

32 downloads per month
Used in 11 crates (10 directly)

Custom license

130KB
2K SLoC

icu_locid_macros crates.io

icu_locid_macros is one of the ICU4X components.

This API provides convenience macros for [icu_locid].

Examples

use icu_locid_macros::{language, region, langid};

let lid = langid!("EN_US");

assert_eq!(lid.language, language!("en"));
assert_eq!(lid.region, Some(region!("US")));

More Information

For more information on development, authorship, contributing etc. please visit ICU4X home page.


lib.rs:

icu_locid_macros is one of the ICU4X components.

This API provides convenience macros for [icu_locid].

Examples

use icu_locid_macros::{language, region, langid};

let lid = langid!("EN_US");

assert_eq!(lid.language, language!("en"));
assert_eq!(lid.region, Some(region!("US")));

Dependencies

~0.8–1.4MB
~32K SLoC