Cldr Messages v0.2.0 Cldr.Message View Source

Implements the ICU Message Format with functions to parse and interpolate messages.

Link to this section Summary

Functions

Formats an ICU messages into an IO list

Formats an ICU message into a string.

Formats an ICU message into a string.

Link to this section Types

Link to this type

arguments()

View Source
arguments() :: list() | map()

Link to this section Functions

Link to this function

format(message, args, options \\ [])

View Source
format(message() | list() | tuple(), arguments(), options()) ::
  list() | {:ok, list()} | {:error, {module(), binary()}}

Formats an ICU messages into an IO list

Link to this function

format!(arg, args, options)

View Source
format!(message() | list() | tuple(), arguments(), options()) ::
  list() | String.t()
Link to this function

to_string(message, args, options \\ [])

View Source
to_string(message(), arguments(), options()) ::
  {:ok, binary()} | {:error, {module(), binary()}}

Formats an ICU message into a string.

Returns {:ok, message} or {:error, reason}.

Link to this function

to_string!(message, args, options \\ [])

View Source
to_string!(message(), arguments(), options()) :: binary() | no_return()

Formats an ICU message into a string.

Returns a string or raises on error