Cldr v0.1.0 Cldr.Number.Symbol
Functions to manage the symbol definitions for a locale and number system.
Summary
Functions
Returns a list of the number symbols for all number systems of a locale
Returns the number sysbols for a specific locale and number system
Functions
Returns a list of the number symbols for all number systems of a locale.
locale
is any locale known toCldr
. SeeCldr.known_locales()
.
Example:
iex> Symbol.number_symbols_for("th")
[latn: %{decimal: ".", exponential: "E", group: ",", infinity: "∞", list: ";",
minus_sign: "-", nan: "NaN", per_mille: "‰", percent_sign: "%",
plus_sign: "+", superscripting_exponent: "×", time_separator: ":"},
thai: %{decimal: ".", exponential: "E", group: ",", infinity: "∞", list: ";",
minus_sign: "-", nan: "NaN", per_mille: "‰", percent_sign: "%",
plus_sign: "+", superscripting_exponent: "×", time_separator: ":"}]
number_symbols_for(Local.t, atom | binary) :: %Cldr.Number.Symbol{decimal: term, exponential: term, group: term, infinity: term, list: term, minus_sign: term, nan: term, per_mille: term, percent_sign: term, plus_sign: term, superscripting_exponent: term, time_separator: term}
Returns the number sysbols for a specific locale and number system.
locale
is any locale known toCldr
. SeeCldr.known_locales()
.number_system
which defaults to:default
and is either:an
atom
in which case it is interpreted as anumber system type
in the given locale. Typically this would be either:default
or:native
. SeeCldr.Number.Format.format_types_for/1
for the number system types available for a givenlocale
.a
binary
in which case it is used to look up the number system directly (for exmple"latn"
which is common for western european languages). SeeCldr.Number.Format.formats_for/1
for the available formats for alocale
.
Example
iex> Cldr.Number.Symbol.number_symbols_for("th", "thai")
%{decimal: ".", exponential: "E", group: ",", infinity: "∞", list: ";",
minus_sign: "-", nan: "NaN", per_mille: "‰", percent_sign: "%",
plus_sign: "+", superscripting_exponent: "×", time_separator: ":"}