Cldr v0.12.2 API Reference
Modules
Cldr provides the core functions to retrieve and manage the CLDR data that supports formatting and localisation
Tokenizer and parser for HTTP Accept-Language
header values as defined in
rfc2616
Provides the functions to manage the Cldr
configuration
Consolidates all locale-specific information from the CLDR repository into one locale-specific file
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
Parses a CLDR language tag (also referred to as locale string)
Functions to parse and normalize locale names into a structure
locale represented byCldr.LanguageTag
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 territory name 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 territory containment data and transforms the formats into a more easily processable structure
Takes the territory info data and transforms the formats into a more easily processable structure
Takes the territory name 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
Function to tokenize and parse a plural rule
Rules Base Number Formatting Configuration management
Functions that operate on a String.t
that are not provided
in the standard lib
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 no valid language tag
in an Accept-Language
header
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 a parse error in a language tag
Exception raised when there is an invalid time format type
Exception raised when no configured locale matches the provided “Accept-Language” header
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 there are no plural rules for a locale or language
Exception raised when there is an invalid territory code
Exception raised when an attempt is made to use a unit that is not known.
in Cldr
Mix Tasks
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