Modules
Locale-aware formatting, validation, and data access built on the Unicode CLDR repository.
Exception raised when interpreting a message and one or more variable bindings are missing.
Calendar localization functions for retrieving locale-specific names for eras, months, days, quarters, and day periods.
Exception returned when a value cannot be written in the calendar asked for, the calendars counting their days differently so that no day of the one is a day of the other.
Protocol for locale-aware string formatting.
Implements the Unicode Collation Algorithm (UCA) as extended by CLDR.
Collation options corresponding to BCP47 -u- extension keys.
Defines a currency structure and functions to manage currency codes, validate currencies, and retrieve currency metadata.
Exception raised when a currency has no display name available for the requested locale.
Exception raised when a known currency code has no localized data in the requested locale.
Provides localized formatting of Date structs and date-like maps.
Returned (or raised) by Localize.Date.parse/2 when an input
string cannot be interpreted as a date.
Returned (or raised) by Localize.Interval.parse/2 when an
input cannot be interpreted as a date range, or when both
endpoints parsed successfully but the resulting range is invalid.
Provides localized formatting of DateTime, NaiveDateTime,
and datetime-like maps.
TR35's append-item path for flexible date-time patterns.
Parses a locale-formatted string as whichever temporal value it turns out to be โ a date, a time, a datetime, or a date range.
Formats relative times such as "3 days ago", "tomorrow" or "in 1.5 hours".
TR35 semantic skeletons: asking for a date or time by meaning rather than by which fields to render.
Provides timezone data access and timezone formatting for CLDR date/time format symbols.
Exception raised when a date, time, or datetime format pattern cannot be processed.
Exception raised when an interval format cannot be resolved.
Exception raised when a date, time, or datetime value does not have the fields required for formatting.
Returned (or raised) when an input string cannot be interpreted as a date, a time, a datetime or a date range.
Returned when text offered to the date-time parser is longer than a date and time can be.
Exception raised when a date, time, or datetime format skeleton cannot be resolved to a pattern for the given locale.
Functions to create and format durations โ the difference between two dates, times, or datetimes expressed in calendar units.
Conventions and a small behaviour shared by structured Localize exceptions.
Exception raised when a value cannot be formatted by the requested message format function due to an incompatible type or missing configuration.
Gettext backend for the Localize library.
Gettext interpolation module for ICU MessageFormat 2 (MF2) messages.
Grammatical inflection for natural language messages, based on the data published by the Unicode inflection project.
An inflectable string with grammatical constraints.
An and/or list of concepts rendered with locale-correct conjunctions.
Resolves the directory holding the compiled inflection data.
Low-level access to the lexical dictionary for a locale.
Inflects words to a target set of grammatical constraints using the lexical dictionary and its inflection patterns.
A pronoun with grammatical constraints.
Downloads inflection data files from the Localize CDN.
Quantified noun phrases: a number joined with a noun that agrees with it grammatically.
A string with an optional distinct spoken form.
Exception returned when a language is supported by the Unicode inflection data but the data has not been downloaded.
Exception returned when no language in a locale's fallback chain is supported by the Unicode inflection data.
Formats date and time intervals as localized strings.
Exception raised when a locale identifier cannot be parsed into a valid language tag.
Exception raised when an extension key or value is not valid for a BCP 47 language tag.
Exception raised when a value does not meet the expected type or constraints for an operation.
Exception raised when a key path cannot be resolved in locale data.
Provides language name localization functions built on the Unicode CLDR repository.
Implements a sigil_l/2 macro for
constructing t:Localize.LanguageTag structs.
Defines the struct for the BCP 47 t
extension.
Defines the struct for the BCP 47 u extension and provides a
standalone parser for -u- extension strings.
Exception raised when likely subtags data cannot be found for a given locale identifier.
Formats lists into locale-aware strings using CLDR list formatting patterns.
Defines the structure for list formatting patterns.
Exception raised when data cannot be kept because the VM's literal memory has no room for it.
Locale utility functions for resolution, validation, and per-locale data access.
Implements the CLDR locale display name algorithm to format locale identifiers for presentation.
Defines the behaviour for locale data providers.
On-disk cache for downloaded locale data files.
A locale data provider that stores locale data in :persistent_term.
Exception raised when the :locale_cache_dir or :otp_app
application environment keys are misconfigured.
Exception raised when a locale file cannot be written to the locale cache directory.
Exception raised when locale display name data is not available for a requested locale.
Exception raised when a locale file cannot be downloaded from its remote URL.
Exception raised when a downloaded locale file fails integrity verification against the hash manifest bundled with the package.
Exception raised when a cached locale file is not the data this release of Localize was built with.
Exception raised when no matching locale can be found within the specified distance threshold.
Exception raised when a locale file is not found in the locale cache directory, or cannot be read for another I/O reason.
Implements ICU MessageFormat 2 with functions to parse and interpolate messages.
Dispatch module for rendering MF2 highlight tokens.
ANSI terminal formatter for MF2 highlight tokens.
HTML formatter for MF2 highlight tokens.
Plain-text formatter for MF2 highlight tokens.
mix format plugin that
canonicalises ICU MessageFormat 2 (MF2) messages.
Behaviour for custom MF2 formatting functions.
Produces a classified token stream from an MF2 AST for syntax highlighting.
Converts between MF2 ASTs and the JSON interchange data model defined in TR35 ยง8.
Behaviour for MF2 function-namespace handlers.
Implements a parser for ICU MessageFormat 2.
Converts a MessageFormat 2 AST back to its canonical string form.
Implements sigils for ICU MessageFormat 2 messages.
Validates a parsed MF2 message against the data-model rules of TR35 Part 9, "Data Model Errors".
Access to CLDR's minimal pairs: short translated phrases that show a grammatical form in context.
Optional NIF interface to ICU4C for high-performance locale operations.
Exception raised when no certificate trust store can be located.
Exception returned when a locale has no minimal pair for the grammatical category a value selects.
Exception raised when a parent locale is requested for the
root locale (und) which has no parent.
Exception raised when a territory has no parent container in the CLDR territory containment data.
Exception returned when quantification is requested without a plural category and without a numeric value to derive one from.
Exception raised when two date or datetime values are considered
equal at every field used by Localize.Interval.greatest_difference/2,
so no greater-than-zero interval field can be returned.
Functions for formatting numbers in a locale-aware manner.
Functions to manage the collection of number format patterns defined in CLDR.
Compiles number format patterns into metadata for fast runtime interpretation.
Describes the metadata that drives number formatting and provides functions to update the struct.
Validation and resolution of number formatting options.
Formats numbers as rational fractions using CLDR rational format patterns.
Functions for parsing numbers and currencies from strings in a locale-aware manner.
Defines plural rule modules for cardinal and ordinal number categories according to the CLDR plural rules specification.
Implements cardinal plural rules for numbers.
Implements ordinal plural rules for numbers.
Plural category selection for numeric ranges.
Rules-Based Number Formatting (RBNF) for algorithmic number systems and spellout forms.
Functions to manage the number symbol definitions for a locale and number system.
Functions to manage number systems for a locale.
Functions to transliterate digits between number systems.
Exception raised when a language tag, unit identifier, or MF2 message cannot be parsed.
Provides script name localization functions built on the Unicode CLDR repository.
The :localize runtime supervisor.
Provides territory and subdivision localization functions built on the Unicode CLDR repository.
Returns the hemisphere a territory lies in.
Territory subdivision localization functions.
Provides localized formatting of Time structs and time-like maps.
Returned (or raised) by Localize.Time.parse/2 when an input
string cannot be interpreted as a time.
A time zone database that knows the time zone of a fixed offset, such as "-05:00", and asks another database for every other zone.
Represents and formats CLDR units of measure.
Converts parsed unit ASTs into their CLDR base unit equivalents.
Canonicalises CLDR unit identifier ASTs and names.
Converts numeric values between CLDR units of measure.
Nonlinear conversion between the Beaufort wind force scale and meters per second.
Runtime registry for user-defined units backed by :persistent_term.
Compile-time extraction of CLDR unit data from a pre-built ETF file.
Arithmetic operations on Localize.Unit structs.
Overloaded arithmetic operators for Localize.Unit.t() values.
Parses CLDR Unit of Measure identifier strings into structured ASTs.
Returns the preferred units for a given unit, territory, and usage.
Exception raised when a unit conversion cannot be performed.
Exception raised when a unit operation requires a numeric value
but the unit struct has nil as its value.
Exception raised when a unit preference cannot be determined for a given unit, region, or usage combination.
Exception returned when a calendar is not one Localize can use:
a name that is not a known CLDR calendar type, or a calendar
module that is neither Calendar.ISO nor answers the callbacks
Localize puts to a calendar, those of the Calendrical behaviour
and of the Calendar behaviour it extends.
Exception raised when a currency code is not a known ISO 4217 or registered custom currency.
Exception returned when a grammatical feature name is not defined for a locale.
Exception raised when a language code cannot be found in the locale display name data.
Exception raised when a locale identifier does not correspond to any known CLDR locale.
Exception raised when a measurement system type is not a known CLDR measurement system.
Exception raised when a number system name is not a known CLDR number system.
Exception raised when no plural rules are available for a given locale.
Exception returned when an initial pronoun is not found in the locale's pronoun table.
Exception raised when an RBNF rule name cannot be resolved for a given locale.
Exception raised when a script code is not a known ISO 15924 or CLDR script subtag.
Exception raised when a display name style is not one of
the known styles (:short, :standard, :variant).
Exception raised when a territory subdivision code is not a known ISO 3166-2 subdivision.
Exception raised when a territory code is not a known ISO 3166 territory or CLDR region code.
Exception raised when a timezone identifier cannot be resolved to a known IANA timezone.
Exception raised when a unit identifier cannot be resolved to a known CLDR unit.
Mix Tasks
Downloads inflection data files from the Localize CDN into the configured inflection data directory.
Downloads locale ETF files from the Localize CDN and stores them in the configured locale cache directory.
Generates a self-contained Elixir module that converts units to their base units, with no dependency on Localize at all.
Verifies a directory of locale ETF files against the SHA-256 manifest bundled with this release of Localize.