Cldr v0.0.5 Cldr.Rbnf
Rules Base Number Formatting
During compilation we want to look up the configured locales and generate the functions needed for only those locales.
For any other recognized locale we need a way to either fallback to a known locale, or error exit (configurable)
Summary
Functions
Returns a map that merges all rules by the primary dimension of RuleGroup, within which rbnf rules are keyed by locale
Returns the rbnf rules for a locale
or {:error, :rbnf_file_not_found}
Returns the list of locales that is the intersection of
Cldr.known_locales/0
and Cldr.Rbnf.rbnf_locales/0
Returns a list of the locales for which there is an rbnf rule set
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 the rbnf rules for a locale
or {:error, :rbnf_file_not_found}
locale
is any locale returned byRbnf.known_locales/0
.
Note that for_locale/1
does not raise if the locale does not exist
like the majority of Cldr
. This is by design since the set of locales
that have rbnf rules is substantially less than the set of locales
supported by Cldr
.
Returns the list of locales that is the intersection of
Cldr.known_locales/0
and Cldr.Rbnf.rbnf_locales/0
This list is therefore the set of known locales for which there are rbnf rules defined.
Returns a list of the locales for which there is an rbnf rule set
Relies on the presence of downloaded CLDR data. This can be achieved
by runnuing mix cldr.download
. This function is usefully primarily
to a Cldr library developer.