Cldr Numbers v1.5.1 Cldr.Rbnf View Source
Functions to implement Rules Based Number Formatting (rbnf)
During compilation RBNF rules are extracted and generated
as function bodies by Cldr.Rbnf.Ordinal, Cldr.Rbnf.Cardinal
and Cldr.Rbnf.NumberSystem.
The functions in this module would not normally be of common use outside of supporting the compilation phase.
Link to this section Summary
Functions
Returns a map that merges all rules by the primary dimension of RuleGroup, within which rbnf rules are keyed by locale
Returns rbnf_rules for a locale or raises an exception if
there are no rules
Returns {:ok, rbnf_rules} for a locale or {:error, {Cldr.NoRbnf, info}}
Returns the list of locales that that have RBNF defined
Link to this section Functions
Returns a map that merges all rules by the primary dimension of RuleGroup, within which rbnf rules are keyed by locale.
This function is primarily intended to support compile-time generation of functions to process rbnf rules.
Returns rbnf_rules for a locale or raises an exception if
there are no rules.
localeis any locale name returned byCldr.Rbnf.known_locale_names/0. or aCldr.LanguageTag
for_locale(Cldr.Locale.t()) :: %{} | nil
Returns {:ok, rbnf_rules} for a locale or {:error, {Cldr.NoRbnf, info}}
localeis any locale name returned byCldr.Rbnf.known_locale_names/0. or aCldr.LanguageTag
Returns the list of locales that that have RBNF defined
This list is the set of known locales for which there are rbnf rules defined.