Cldr HTML

HTML helper functions for CLDR.

Usage

Examples

iex> import Phoenix.HTML
iex> safe_to_string Cldr.HTML.Currency.select(:my_form, :currency, selected: :USD, currencies: ~w(usd eur jpy cop))
"<select id=\"my_form_currency\" name=\"my_form[currency]\" selected=\"USD\"><option value=\"COP\">COP - Colombian Peso</option><option value=\"EUR\">EUR - Euro</option><option value=\"JPY\">JPY - Japanese Yen</option><option value=\"USD\">USD - US Dollar</option></select>"

Installation

Cldr.HTML can be installed by adding ex_cldr_html to your list of dependencies in mix.exs:

def deps do
[
{:ex_cldr_html, "~> 1.0"}
]
end

The documentation can be found at https://hexdocs.pm/cldr_html.