Cldr v0.0.12 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

Consolidates all locale-specific information from the CLDR repository into one locale-specific file

Defines a currency structure and a set of functions to manage the validity of a currency code

Implements a Gettext-compatible module but using Cldr locales

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

Support for installing locales on demand

Cldr incudes patterns that enable list to be catenated together to form a grammatically correct language construct for a given locale

Parse and process locale json as defined by Unicode

Helper functions for transforming maps, keys and values

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 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

The main public API for the formatting of numbers and currencies

Implements cardinal plural rules for numbers

Functions to manage the collection of number patterns defined in Cldr

Compiles number patterns with a lexer/parser into patterns for fast runtime interpretation

Number formatter for the :currency :long format

Formats a number according to a locale-specific predefined format or a user-defined format

Formats a number according to the locale-specific :short formats

Math helper functions for number formatting

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

String helper functions

Functions to manage the symbol definitions for a locale and number system

Functions to manage number systems which describe the numbering characteristics for a locale

Transliteration for digits and separators

Functions to implement Rules Based Number Formatting (rbnf)

Rules Base Number Formatting Configuration management

Functions to implement the ordinal rule-based-number-format rules of CLDR

Functions to implement the ordinal rule-based-number-format rules of CLDR

Macro to define the interpreter for the compiled RBNF rules specific to a rule group (Ordinal, Spellout, NumberingSystem)

Tokenizer and Parser for RBNF rules

Functions to implement the spellout rule-based-number-format rules of CLDR

Mix task to consolidate the cldr data into a set of files, one file per CLDR locale

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

Exceptions

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

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 locale not configured in Cldr. Cldr.known_locales/0 returns the locale names known to Cldr