Skip to content

Cldr Messages version 0.9.0

Compare
Choose a tag to compare
@kipcole9 kipcole9 released this 17 Nov 21:51
· 100 commits to master since this release

Enhancements

  • Supports number arguments to be either a number or a tuple of the form {number, keyword_list_of_formatting_options}. This provides an escape hatch for developers to influence formatting of the number beyond the textual format of the message. For example:
# Uses the currency for the current locale
iex> Cldr.Message.format "this is {one, number, currency}", one: 1
{:ok, "this is $1.00"}

# Forces the :MXP currency
iex> Cldr.Message.format "this is {one, number, currency}", one: {1, currency: :MXP}
{:ok, "this is MXP 1.00"}