Cldr.Number.Format.all_formats_for
You're seeing just the function
all_formats_for
, go back to Cldr.Number.Format module for more information.
Specs
all_formats_for( Cldr.LanguageTag.t() | Cldr.Locale.locale_name(), Cldr.backend() ) :: {:ok, map()} | {:error, {module(), String.t()}}
Returns the decimal formats defined for a given locale.
Options
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
Examples
Cldr.Number.Format.all_formats_for("en", MyApp.Cldr)
#=> {:ok, %{latn: %Cldr.Number.Format{
accounting: "¤#,##0.00;(¤#,##0.00)",
currency: "¤#,##0.00",
percent: "#,##0%",
scientific: "#E0",
standard: "#,##0.###",
currency_short: [{"1000", [one: "¤0K", other: "¤0K"]},
{"10000", [one: "¤00K", other: "¤00K"]},
{"100000", [one: "¤000K", other: "¤000K"]},
{"1000000", [one: "¤0M", other: "¤0M"]},
{"10000000", [one: "¤00M", other: "¤00M"]},
{"100000000", [one: "¤000M", other: "¤000M"]},
{"1000000000", [one: "¤0B", other: "¤0B"]},
{"10000000000", [one: "¤00B", other: "¤00B"]},
{"100000000000", [one: "¤000B", other: "¤000B"]},
{"1000000000000", [one: "¤0T", other: "¤0T"]},
{"10000000000000", [one: "¤00T", other: "¤00T"]},
{"100000000000000", [one: "¤000T", other: "¤000T"]}],
....
}}