Cldr.Number.Format.decimal_format_list_for
You're seeing just the function
decimal_format_list_for
, go back to Cldr.Number.Format module for more information.
Specs
decimal_format_list_for( Cldr.LanguageTag.t() | Cldr.Locale.locale_name(), Cldr.backend() ) :: {:ok, [String.t()]} | {:error, {module(), String.t()}}
Returns the list of decimal formats for a configured locale.
Arguments
locale
is any valid locale name returned byCldr.known_locale_names/1
or aCldr.LanguageTag
struct returned byCldr.Locale.new!/2
. The default isCldr.get_locale/1
backend
is anyCldr
backend. That is, any module that containsuse Cldr
This function exists to allow the decimal formatter to precompile all the known formats at compile time. Its use is not otherwise recommended.
Example
iex> Cldr.Number.Format.decimal_format_list_for("en", MyApp.Cldr)
{:ok, ["#,##0%", "#,##0.###", "#E0", "0 billion", "0 million", "0 thousand",
"0 trillion", "00 billion", "00 million", "00 thousand", "00 trillion",
"000 billion", "000 million", "000 thousand", "000 trillion", "000B", "000K",
"000M", "000T", "00B", "00K", "00M", "00T", "0B", "0K", "0M", "0T",
"¤#,##0.00", "¤#,##0.00;(¤#,##0.00)", "¤000B", "¤000K", "¤000M",
"¤000T", "¤00B", "¤00K", "¤00M", "¤00T", "¤0B", "¤0K", "¤0M", "¤0T"]}