Cldr v0.7.0 API Reference

Modules

Cldr provides functions to localise numbers, currencies, lists and dates/times to an appropriate locale as defined by the CLDR data maintained by the ICU

Provides the functions to manage the Cldr configuration

Abstract representation of number (integer, float, Decimal) in tuple form and functions for transformations on number parts

Implements a Gettext-compatible module but using Cldr locales. Its an example only

Defines a Plural module for Gettext that uses the Cldr plural rules

Provides functions for installing locales

Parse and process locale json as defined by Unicode

Helper functions for transforming maps, keys and values

Math helper functions for number formatting

Takes the currency part of the locale map and transforms the formats into a more easily processable structure that is then stored in map managed by Cldr.Locale

Takes the list part of the locale map and transforms the formats into a more easily processable structure that is then stored in map managed by Cldr.Locale

Takes the date part of the locale map and transforms the formats into a more easily processable structure that is then stored in map managed by Cldr.Locale

Takes the list part of the locale map and transforms the formats into a more easily processable structure that is then stored in map managed by Cldr.Locale

Takes the number part of the locale map and transforms the formats into a more easily processable structure that is then stored in map managed by Cldr.Locale

Takes the number system part of the locale map and transforms the formats into a more easily processable structure that is then stored in map managed by Cldr.Locale

Takes the rbnf part of the locale map and transforms the formats into a more easily processable structure that is then stored in map managed by Cldr.Locale

Takes the units part of the locale map and transforms the formats into a more easily processable structure that is then stored in map managed by Cldr.Locale

Implements cardinal plural rules for numbers

Implements ordinal plural rules for numbers

Macro to define plural rule methods on a module

Generate functions from CLDR plural rules that can be used to determine which pularization rule to be used for a given number

Tranformations on the parse tree returned from parsing plural rules

Rules Base Number Formatting Configuration management

Compiles substituation formats that are of the form “{0} something {1}” into a token list that allows for more efficient parameter substituation at runtime

Exceptions

Exception raised when there is an error in the compiling of a number format

Exception raised when there is an error in the formatting of a number/list/

Exception raised when there is an invalid date format type

Exception raised when there is an invalid datetime format type

Exception raised when there is an invalid time format type

Exception raised when there is no RBNF for a locale

Exception raised when an attempt is made to use a calendar that is not known. in Cldr

Exception raised when there is an invalid currency code

Exception raised when an attempt is made to use a locale that is not configured in Cldr. Cldr.known_locales/0 returns the locale names known to Cldr

Exception raised when an attempt is made to use a locale not configured in Cldr. Cldr.known_locales/0 returns the locale names known to Cldr

Exception raised when an attempt is made to use a number system that is not known in Cldr. Cldr.Number.number_system_names/0 returns the number system names known to Cldr

Exception raised when an attempt is made to use a unit that is not known. in Cldr

Mix Tasks

Installs the cldr core data and configured locales into the application. By default it installs into the ./priv/cldr directory