View Source Bonfire.Common.Localise.Cldr.Number.Symbol (Bonfire v0.9.10-classic-beta.169)
Summary
Functions
Returns a list of all decimal symbols defined by the locales configured in this backend as a list.
Returns a list of all decimal symbols defined by the locales configured in this backend as a string.
Returns a list of all grouping symbols defined by the locales configured in this backend as a list.
Returns a list of all grouping symbols defined by the locales configured in this backend as a string.
Returns a map of Cldr.Number.Symbol.t
structs of the number symbols for each
of the number systems of a locale.
Functions
Returns a list of all decimal symbols defined by the locales configured in this backend as a list.
Returns a list of all decimal symbols defined by the locales configured in this backend as a string.
This string can be used as a character class when builing a regular expression.
Returns a list of all grouping symbols defined by the locales configured in this backend as a list.
Returns a list of all grouping symbols defined by the locales configured in this backend as a string.
This string can be used as a character class when builing a regular expression.
number_symbols_for(locale \\ Bonfire.Common.Localise.Cldr.get_locale())
View Source@spec number_symbols_for(Cldr.LanguageTag.t() | Cldr.Locale.locale_name()) :: {:ok, map()} | {:error, {module(), String.t()}}
Returns a map of Cldr.Number.Symbol.t
structs of the number symbols for each
of the number systems of a locale.
Options
locale
is any valid locale name returned byBonfire.Common.Localise.Cldr.known_locale_names/0
or aCldr.LanguageTag
struct returned byBonfire.Common.Localise.Cldr.Locale.new!/1
. The default isBonfire.Common.Localise.Cldr.get_locale/0
.
Example:
iex> Bonfire.Common.Localise.Cldr.Number.Symbol.number_symbols_for(:th)
{:ok, %{
latn: %Cldr.Number.Symbol{
decimal: ".",
exponential: "E",
group: ",",
infinity: "∞",
list: ";",
minus_sign: "-",
nan: "NaN",
per_mille: "‰",
percent_sign: "%",
plus_sign: "+",
superscripting_exponent: "×",
time_separator: ":"
},
thai: %Cldr.Number.Symbol{
decimal: ".",
exponential: "E",
group: ",",
infinity: "∞",
list: ";",
minus_sign: "-",
nan: "NaN",
per_mille: "‰",
percent_sign: "%",
plus_sign: "+",
superscripting_exponent: "×",
time_separator: ":"
}
}}