formatjs_icu_messageformat
Rust runtime for ICU MessageFormat. Mirrors intl-messageformat around the
existing formatjs_icu_messageformat_parser AST and uses ICU4X for locale-aware
number, date/time, and plural formatting.
use ;
use HashMap;
let message = try_new?;
let values = from;
assert_eq!;
# Ok::
Messages are parsed once without a locale. Pass each request's locale to
format, format_to_parts, or format_to_string; one compiled message can be
shared across requests with different locales.
Unix epoch millisecond values are formatted in UTC. ICU4X currently lacks full
ECMA-402 currency, unit, and time-zone formatting parity; custom implementations
can be supplied through the Formatters trait.