NIF wrapper for ICU4C MessageFormat 2.0.
Provides validate/1 and format/3 functions that delegate to
ICU's MessageFormatter implementation. The NIF is optional — when
unavailable, available?/0 returns false and calls raise
:nif_library_not_loaded.
Summary
Functions
Returns true if the MF2 NIF is loaded and available.
Formats a MessageFormat 2 message string using ICU.
Validates a MessageFormat 2 message string using ICU's parser.
Functions
@spec available?() :: boolean()
Returns true if the MF2 NIF is loaded and available.
Formats a MessageFormat 2 message string using ICU.
Arguments are passed as a map of %{name => value} and
encoded to JSON for the NIF.
Returns {:ok, formatted_string} or {:error, reason}.
Validates a MessageFormat 2 message string using ICU's parser.
Returns {:ok, normalized_pattern} or {:error, reason}.