This document maps the features defined in Unicode Technical Standard #35 (LDML) version 48 against the implementation status of the Localize library.

Two areas are explicitly out of scope:

  • Part 7 — Keyboards. Not relevant to a formatting library.

  • Part 8 — Person Names. Implemented as the separate localize_person_names package, which uses Localize's person-name locale data (stored under the :person_names key in each locale ETF) and implements the full TR35 Part 8 formatting algorithm.

Legend

  • Implemented — feature is present and tested.
  • Partial — core functionality exists but some sub-features are missing.
  • Not implemented — feature is absent.

Part 1 — Core (tr35.html)

Unicode Language and Locale Identifiers

FeatureStatusNotes
BCP 47 / RFC 5646 language tag parsingImplementedLocalize.Rfc5646.Parser, pre-compiled NimbleParsec grammar.
Unicode locale extensions (-u-)ImplementedCalendar (ca), collation (co), currency (cu), number system (nu), hour cycle (hc), first day (fw), region override (rg), measurement system (ms), and others.
Transformed extensions (-t-)ImplementedParser and struct support in Localize.LanguageTag.
Private use subtags (-x-)Implemented
Grandfathered and irregular tagsImplemented
Locale ID canonicalizationPartialAlias resolution via supplemental data. Full Annex C canonicalization algorithm not independently verified.

Locale Inheritance and Matching

FeatureStatusNotes
Parent locale chainImplementedLocalize.Locale.parent/1 uses CLDR parent locale data.
Likely subtagsImplementedLocalize.LanguageTag.add_likely_subtags/1 and remove_likely_subtags/1.
Locale matching / best matchImplementedLocalize.LanguageTag.best_match/3 using CLDR language matching data.
Default content localesNot implemented
Locale inheritance for data lookupPartialLocale.get/3 supports :fallback option to walk parent chain. Not all data accessors use it consistently.

Validity Data

FeatureStatusNotes
Language validityImplementedLocalize.Validity with ETF data.
Script validityImplemented
Territory validityImplemented
Variant validityImplemented
Unit validityImplemented
Subdivision validityImplemented
U and T extension validityImplemented

Part 2 — General (tr35-general.html)

Display Names

FeatureStatusNotes
Language display namesImplementedLocalize.Language.display_name/2 with :standard, :short, :long, :menu, and :variant styles.
Script display namesImplementedLocalize.Script.display_name/2 with :standard, :short, :stand_alone, and :variant styles.
Territory display namesImplementedLocalize.Territory.display_name/2 with :standard, :short, :variant styles.
Variant display namesNot implemented
Key/type display namesNot implemented
Locale display namesImplementedLocalize.Locale.LocaleDisplay.display_name/2 implements the CLDR locale display name algorithm.

Layout

FeatureStatusNotes
Character order (LTR/RTL)Not implemented
Line orderNot implemented

Character Elements

FeatureStatusNotes
Exemplar charactersNot implemented
Ellipsis patternsImplementedLocalize.ellipsis/2 with :initial, :medial, :final, :word_initial, :word_medial, :word_final styles.
Parse lenient charactersNot implemented

Delimiters

FeatureStatusNotes
Quotation marksImplementedLocalize.quote/2 with locale-appropriate primary and alternate quotation marks.

Measurement System Data

FeatureStatusNotes
Measurement system per territoryImplementedLocalize.validate_measurement_system/1 and supplemental data.
Paper size per territoryNot implemented

Unit Elements

FeatureStatusNotes
Unit identifiers (simple, compound)ImplementedLocalize.Unit.Parser parses full CLDR unit identifier syntax including SI prefixes, powers, per-units.
Unit formatting with plural patternsImplementedLocalize.Unit.to_string/2 with :long, :short, :narrow styles.
Compound unit formattingImplementedMultiplication, division, and power patterns.
Mixed/sequence unitsPartialLocalize.Unit struct supports mixed units; formatting coverage not fully verified.
Duration unit patterns (hms)ImplementedLocalize.Duration.to_time_string/2 formats durations as "hh:mm:ss" with unbounded hours. to_string/2 formats as localized unit list (e.g., "11 months and 30 days").
Coordinate units (N/S/E/W)Not implemented
Unit conversionImplementedLocalize.Unit.Conversion with factor/offset mappings to base units.
Unit preferences by territoryImplementedTerritory and usage-based unit selection from supplemental data.
Grammatical case in unitsPartial:grammatical_case option supported in formatter with :nominative default. Full case/gender/definiteness coverage depends on locale data.
Grammatical gender in unitsPartialData structures present; not all locales exercised.

Transforms

FeatureStatusNotes
General character transformsSeparate libraryunicode_transform implements the CLDR transform rules engine.
Script-to-script transliterationSeparate libraryProvided by unicode_transform.
Number digit transliterationImplementedLocalize.Number.Transliterate for numeric digit systems (e.g., Latin → Arabic-Indic).

List Patterns

FeatureStatusNotes
Conjunction lists ("a, b, and c")ImplementedLocalize.List.to_string/2 with :and, :and_short styles.
Disjunction lists ("a, b, or c")Implemented:or style.
Unit lists ("3 ft, 7 in")Implemented:unit, :unit_short, :unit_narrow styles.

Context Transforms

FeatureStatusNotes
Capitalization by contextNot implementedNo context-dependent capitalization for display names.

Segmentation

FeatureStatusNotes
Grapheme cluster boundariesSeparate libraryunicode_string implements Unicode text segmentation.
Word boundariesSeparate libraryProvided by unicode_string.
Sentence boundariesSeparate libraryProvided by unicode_string.
Line break boundariesSeparate libraryProvided by unicode_string.

Annotations

FeatureStatusNotes
Character/emoji labelsNot implemented
Typographic namesNot implemented

POSIX Elements

FeatureStatusNotes
Yes/no stringsNot implemented
POSIX locale identifier conversionImplementedLocalize.Locale handles POSIX-style identifiers (e.g., en_US.UTF-8).

Part 3 — Numbers (tr35-numbers.html)

Number Systems

FeatureStatusNotes
Numeric systems (digit mapping)ImplementedLocalize.Number.System with 97 systems loaded from ETF.
Algorithmic systems (RBNF)ImplementedLocalize.Number.Rbnf for Roman numerals, CJK, spellout, etc.
Number system per localeImplemented:default, :native, :traditional, :finance types resolved per locale.

Number Formatting

FeatureStatusNotes
Decimal format patternsImplementedLocalize.Number.to_string/2 with full pattern support.
Percent formattingImplementedformat: :percent option.
Currency formattingImplementedformat: :currency with symbol placement, spacing.
Accounting formatImplementedformat: :accounting for parenthesized negatives.
Compact/short formats ("1.2M")Implementedformat: :decimal_short, :decimal_long, :currency_short, :currency_long.
Scientific notationImplementedExponent formatting with configurable digits.
Significant digitsImplemented@ pattern character for significant digit control.
Number paddingImplemented* pattern character for fixed-width padding.
Grouping separatorsImplementedPrimary and secondary grouping sizes.
RoundingImplementedPattern-specified increments, half-even default.
Special values (NaN, Infinity)Implemented
Number symbols per localeImplementedDecimal, grouping, percent, minus, plus, exponential, etc.

Number Parsing

FeatureStatusNotes
String to number parsingImplementedLocalize.Number.Parser with locale-aware digit transliteration.
Lenient parsingNot implemented

Number Ranges

FeatureStatusNotes
Number range formattingImplementedLocalize.Number.to_range_string/3 using locale-specific range patterns.
Approximate number formattingImplementedLocalize.Number.to_approximately_string/2, also to_at_least_string/2 and to_at_most_string/2.

Rational Numbers

FeatureStatusNotes
Fraction formattingImplementedLocalize.Number.to_ratio_string/2.

Currencies

FeatureStatusNotes
Currency codes and validationImplementedLocalize.Currency.validate_currency/1 with ISO 4217.
Currency display names (plural)ImplementedLocalize.Currency.display_name/2, pluralize/3.
Currency symbolsImplementedVia locale data.
Currency digits/roundingImplementedSupplemental currency data.
Territory currency historyImplementedLocalize.Currency.territory_currencies/1 with date ranges.
Current currency for territoryImplementedLocalize.Currency.current_currency_for_territory/1.

Plural Rules

FeatureStatusNotes
Cardinal plural rulesImplementedLocalize.Number.PluralRule.Cardinal with all CLDR operands (n, i, f, t, v, w, c, e).
Ordinal plural rulesImplementedLocalize.Number.PluralRule.Ordinal.
Plural rangesImplementedLocalize.Number.PluralRule.Range.
Explicit 0 and 1PartialStandard plural categories used; explicit 0/1 override not independently verified.

Rule-Based Number Formatting (RBNF)

FeatureStatusNotes
Spellout rulesImplementedLocalize.Number.Rbnf with locale-specific rule sets.
Ordinal rulesImplemented
Numbering system rulesImplementedRoman numerals, CJK, etc. via algorithmic number systems.

Part 4 — Dates (tr35-dates.html)

Calendar Elements

FeatureStatusNotes
Month names (format/standalone, wide/abbreviated/narrow)ImplementedLocalize.Calendar.months/2.
Day names (format/standalone, wide/abbreviated/narrow)ImplementedLocalize.Calendar.days/2.
Quarter namesImplementedLocalize.Calendar.quarters/2.
Era namesImplementedLocalize.Calendar.eras/2.
Day period names (AM/PM, flexible)ImplementedLocalize.Calendar.day_periods/2.
Cyclic name sets (Chinese/Dangi)Not implemented
Month patterns (leap months)Not implemented

Date/Time Formatting

FeatureStatusNotes
Date format patterns (:short/:medium/:long/:full)ImplementedLocalize.Date.to_string/2.
Time format patterns (:short/:medium/:long/:full)ImplementedLocalize.Time.to_string/2.
DateTime combined patternsImplementedLocalize.DateTime.to_string/2.
All date format pattern symbols (y, M, d, E, G, etc.)ImplementedFull symbol set in Localize.DateTime.Formatter.
Hour cycle (h, H, k, K)ImplementedIncluding territory-based preferences.
Day periods (a, b, B)ImplementedAM/PM and flexible day periods.
Available formats (skeletons)ImplementedLocalize.DateTime.Format.Match for skeleton matching.
Interval formatsImplementedLocalize.Interval.to_string/3 for date/time/datetime intervals.
Append items (missing fields)Not implemented

Date/Time Parsing

FeatureStatusNotes
String to date/time parsingNot implemented

Calendar Fields

FeatureStatusNotes
Relative date/time formattingImplementedLocalize.DateTime.Relative — "yesterday", "in 3 days", etc.
Calendar field display namesPartialData accessible via locale data; no dedicated public function for field names.

Supplemental Date Data

FeatureStatusNotes
Calendar preferences per territoryImplementedSupplemental data loaded from ETF.
Week data (firstDay, minDays)ImplementedLocalize.SupplementalData.weeks/0.
Weekend dataImplementedVia week data.
Time data (preferred hour cycle)ImplementedTime preferences data from ETF.
Day period rulesImplementedDay period rule sets loaded from supplemental data.

Time Zones

FeatureStatusNotes
Timezone format symbols (z, Z, O, v, V, X, x)ImplementedLocalize.DateTime.Formatter handles all timezone symbols.
GMT offset formattingImplementedhourFormat, gmtFormat, gmtZeroFormat patterns.
Metazone namesNot implementedMetazone data is not loaded or used for display name resolution.
Exemplar citiesNot implemented
Timezone fallback formattingPartialOffset-based fallback works; metazone name fallback chain not implemented.

Semantic Skeletons

FeatureStatusNotes
Semantic skeleton supportNot implementedTraditional skeleton matching is implemented but the newer semantic skeleton system from TR35 Section 29-32 is not.

Supported Calendars

FeatureStatusNotes
GregorianImplementedPrimary calendar.
JapaneseImplementedEra data and formatting.
ChineseImplementedCalendar data present.
PersianImplementedCalendar data present.
CopticImplementedCalendar data present.
EthiopicImplementedIncluding Amete Alem variant.
Dangi (Korean)ImplementedCalendar data present.
BuddhistImplementedEra (BE), month, and day data tested.
HebrewImplementedEra (AM), 13-month calendar with leap year variant tested.
Islamic variantsImplemented:islamic, :islamic_civil, :islamic_rgsa, :islamic_tbla, :islamic_umalqura — eras (AH) and month names (Muharram, Ramadan, etc.) tested.
ROC (Minguo)ImplementedEra names (B.R.O.C., Minguo) tested.
Indian (Saka)ImplementedCalendar data present and included in known_calendars/0.

Part 5 — Collation (tr35-collation.html)

Core Collation

FeatureStatusNotes
UCA (Unicode Collation Algorithm)ImplementedLocalize.Collation with DUCET-based sort key generation.
CLDR root collationImplementedUses allkeys_CLDR data.
Multi-level comparison (L1-L4)ImplementedPrimary through quaternary levels.
Variable weighting (shifted)Implementedalternate: :shifted option.
Normalization (NFD)ImplementedAutomatic NFD when tailoring requires it.
French secondary sortingImplementedbackwards: :level2 / [backwards 2] directive.

Collation Options (BCP 47 keys)

FeatureStatusNotes
Strength (ks)ImplementedLevels 1-4 and identical.
Alternate (ka)Implementednoignore and shifted.
Backwards (kb)ImplementedLevel 2 reversal.
Normalization (kk)Implemented
Case level (kc)Implemented
Case first (kf)Implementedupper and lower.
Numeric collation (kn)ImplementedLocalize.Collation.Numeric for number-aware sorting.
Reorder (kr)ImplementedScript reordering with weight remapping.
Max variable (kv)Implementedspace, punct, symbol, currency.
Hiragana quaternary (kh)Not implementedDeprecated in recent UCA.

Collation Tailoring

FeatureStatusNotes
Locale-specific tailoring rulesImplemented110 locale/type pairs covering 97 languages, extracted from CLDR XML.
Relation operators (<, <<, <<<, <<<<, =)Implemented
Contractions (multi-character)Implemented
Expansions (slash notation)Implementede.g., ccs/cs in Hungarian.
Star syntax (<*)ImplementedUsed for CJK and other large character sets.
Context before (|)Not implemented
[before N] positioningNot implemented
[suppressContractions]ImplementedUsed by cu, sr, mk.
[optimize]Not applicableAdvisory hint; intentionally ignored.
[import]ImplementedResolved at extraction time — imported rules are inlined into the ETF. Supports BCP47 tags (e.g., und-u-co-search, de-u-co-phonebk) and short locale tags (e.g., hr).
[strength] directiveNot implementedUsed by ja:private-kana only.

Collation Types

FeatureStatusNotes
Standard collationImplementedDefault type for all locales.
Search collationImplementedRoot search rules (Arabic form equivalences, Korean jamo decomposition, [suppressContractions]) extracted from CLDR XML. 20 locale-specific search types with resolved imports. Accessed via type: :search option.
Phonebook (de), Pinyin (zh), etc.PartialSome non-standard types extracted; not all verified.

Collation Features

FeatureStatusNotes
Alphabetic index charactersNot implementedNo UI bucketing support.
Collation type fallback chainPartialFalls back to standard; full 7-step chain not verified.

Part 6 — Supplemental (tr35-info.html)

Territory Data

FeatureStatusNotes
Territory containmentImplementedLocalize.Territory.territory_containers/0, territory_containment/0.
Subdivision containmentImplementedLocalize.Territory.territory_subdivision_containment/0.
Territory information (GDP, population)ImplementedLocalize.Territory.info/1.
Language population dataImplementedVia territory info.
Emoji flagsImplementedLocalize.Territory.unicode_flag/1.

Supplemental Language Data

FeatureStatusNotes
Scripts per languageNot implementedData not exposed as a public API.
Language grouping (families)Not implemented

Code Mappings

FeatureStatusNotes
Territory code mappings (alpha-2/3, FIPS, numeric)ImplementedLocalize.Territory.territory_codes/0.
Currency code mappingsImplementedISO 4217 via Localize.Currency.

Aliases

FeatureStatusNotes
Language aliasesImplementedSupplemental alias data loaded from ETF.
Territory aliasesImplemented
Script aliasesImplemented
Variant aliasesImplemented

Parent Locales

FeatureStatusNotes
CLDR parent locale dataImplementedLocalize.Locale.parent/1.

Unit Data (Supplemental)

FeatureStatusNotes
Unit conversion factorsImplementedExtracted from CLDR XML via scripts/extract_unit_data.exs.
Unit preferences per territoryImplemented
Unit quantities and base unitsImplemented
SI and binary prefixesImplementedLocalize.Unit.Parser handles all CLDR prefixes.

Coverage Levels

FeatureStatusNotes
Coverage level assessmentNot implemented

Part 9 — MessageFormat (tr35-messageFormat.html)

MF2 Syntax

FeatureStatusNotes
Simple messagesImplementedLocalize.Message.Parser with pre-compiled NimbleParsec grammar.
Complex messagesImplemented
Quoted patterns ({{...}})Implemented
Text and escape sequencesImplemented
Declarations (.input, .local)ImplementedLocalize.Message.Interpreter handles all declaration types.
Pattern selection (.match)ImplementedWith selector resolution and variant ranking.
Expressions (literal, variable, function)Implemented
Options on functionsImplemented
Markup (open, close, standalone)ImplementedParsed and emitted in interpreter output.
AttributesImplementedParsed; treated as metadata per spec.

MF2 Default Functions

FeatureStatusNotes
:stringImplemented
:numberImplementedDelegates to Localize.Number.to_string/2.
:integerImplemented
:percentImplemented
:currencyImplemented
:unitImplementedDelegates to Localize.Unit.to_string/2.
:dateImplementedDelegates to Localize.Date.to_string/2.
:timeImplementedDelegates to Localize.Time.to_string/2.
:datetimeImplementedDelegates to Localize.DateTime.to_string/2.
:offsetImplementedSubtracts offset from operand for plural selection while formatting the original value. Used for patterns like "you and N other people".

Localize-specific MF2 functions (not in the spec)

FunctionNotes
:listFormats a list operand by delegating to Localize.List.to_string/2. Each element is itself formatted via Localize.Chars, so a list of dates, numbers, units, etc. picks up the message's locale and forwarded options. Supports a style (or type) option whose values map to CLDR list styles: "and", "and-short", "and-narrow", "or", "or-short", "or-narrow", "unit", "unit-short", "unit-narrow". Default is "and".

MF2 Error Handling

FeatureStatusNotes
Syntax errorsImplementedParser returns {:error, reason}.
Resolution errors (unknown function, unresolved variable)PartialUnknown functions fall back to string conversion rather than error.
Data model errorsPartialDuplicate declarations and options not explicitly validated.

MF2 Data Model

FeatureStatusNotes
JSON interchange formatImplementedLocalize.Message.JSON.to_json/2 and from_json/1 for round-trip serialization to the TR35 §8 data model.
Bidirectional text handlingImplemented:bidi option (:none, :isolate, :auto) wraps placeholder output in Unicode isolate characters (FSI/PDI). Supports u:dir attribute for per-expression overrides.

Summary

Implemented (core functionality present and tested)

  • Language tag parsing and validation (BCP 47 / RFC 5646)
  • Locale management (get/put/default/with_locale)
  • Likely subtags and locale matching
  • Number formatting (decimal, percent, currency, accounting, compact, scientific, RBNF)
  • Number parsing
  • Date, time, and datetime formatting
  • Interval formatting
  • Relative date/time formatting
  • Unit formatting, conversion, and preferences (also include basic math functions)
  • List formatting
  • Currency data and validation
  • Territory data and display names
  • Language display names
  • Locale display names
  • Plural rules (cardinal, ordinal, ranges)
  • Collation with locale tailoring (97 languages)
  • MessageFormat 2 parsing and interpretation
  • Quotation marks and ellipsis formatting

Separate libraries

Not implemented

  • Date/time parsing (string to date)
  • Metazone display names
  • Semantic skeletons
  • Context-dependent capitalization
  • Collation alphabetic index (UI bucketing)
  • Coordinate unit formatting (N/S/E/W)
  • Layout direction data
  • Coverage level assessment
  • Cyclic name sets (Chinese/Dangi calendars)
  • Append items (missing date/time fields)

Not in scope for Localize

  • Emoji/character annotations and labels
  • Keyboards