API Reference Cldr v2.23.0

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.

Exception raised when there no valid language tag in an Accept-Language header.

Exception raised when the there are more than one timezones for a locale

The Cldr.Chars protocol mirrors the String.Chars protocol but localises the output. It is intended to be drop-in replacement for String.Chars.

Provider configuration support functions for ex_cldr.

Returns the localised display name for a CLDR struct (locale, unit, currency)

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

Provides functions for installing locales.

Exception raised when there is an invalid date format type.

Exception raised when there is an invalid datetime format type.

Exception raised when a language is invalid

Exception raised when there is an a parse error in a language tag

Exception raised when a script is invalid

Exception raised when a territory is invalid

Exception raised when there is an invalid time format type.

Exception raised when a language variant is invalid

Represents a language tag as defined in rfc5646 with extensions "u" and "t" as defined in BCP 47.

Exception raised when a language tag cannot be parsed (there is unparsed content).

Parses a CLDR language tag (also referred to as locale string).

Implements a sigil_l/2 macro to constructing t:Cldr.LanguageTag structs.

Defines the struct for the BCP 47 t extension.

Defines the struct for the BCP 47 u extension.

Functions to parse and normalize locale names into a structure locale represented by a Cldr.LanguageTag.

Exception raised when there is no default backend configured

Exception raised when no configured locale matches the provided "Accept-Language" header

Exception raised when the there are more no parent locale

Defines the plural rule implementation modules. The functions in this module generate code to implement the plural rules of CLDR.

Parses the accept-language header if one is available and sets conn.private[:cldr_locale] accordingly. The locale can be later retrieved by Cldr.Plug.AcceptLanguage.get_cldr_locale/1

Puts the CLDR locale name in the session.

Sets the Cldr and/or Gettext locales derived from the accept-language header, a query parameter, a url parameter, a body parameter or the session.

Exception raised when there is no RBNF for a locale.

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

Functions to map between the CLDR short time zone code and the IANA timezone names.

Exception raised when the backend module is unknown or not a backend module

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_locale_names/1 returns the locale names known to Cldr.

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

Exception raised when the measurement system is invalid.

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 number system type that is not known in Cldr. Cldr.Number.number_system_types/0 returns the number system types known to Cldr.

Exception raised when the configured OTP app is not known

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.

Provides the core functions to retrieve and manage the CLDR data that supports formatting and localisation.

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

Backend module that provides functions to define new locales and display human-readable locale names for presentation purposes.

Implements cardinal plural rules for numbers.

Implements ordinal plural rules for numbers.

Implements plural rules for ranges