Skip to content

ADR-008: SmartFormat.NET — CLDR Pluralization

Date: 2026-02-26 Authors: Jean-Francois Meyers Scope: granit-dotnet (Granit.Localization)

The Granit.Localization module provides a modular JSON localization system. Pluralization is a critical feature for multilingual applications: CLDR rules (Unicode Common Locale Data Repository) define pluralization categories that vary by language (French: singular/plural, Arabic: 6 forms, etc.).

SmartFormat.NET for pluralization in the localization system.

  • License: MIT
  • Advantage: complete CLDR support (all languages), familiar syntax ({0:plural:...}), lightweight (~50 KB), no native dependency (ICU), extensible via custom formatters
  • Maturity: 12+ years, active
  • Advantage: official ICU implementation for .NET, MessageFormat support
  • Disadvantage: native ICU dependency (cross-platform deployment issues, ~30 MB size), complex API, limited .NET documentation
  • Advantage: implementation of the ICU MessageFormat standard
  • Disadvantage: poorly maintained project, limited community, insufficient documentation, no complete CLDR support
  • Advantage: full control, zero dependency
  • Disadvantage: reimplementing CLDR rules (200+ languages) is a considerable effort and error-prone, long-term maintenance burden
  • Advantage: industry standard for localization, mature tooling
  • Disadvantage: .po file format incompatible with Granit’s JSON system, requires a complete overhaul of the localization pipeline, limited .NET ecosystem
CriterionSmartFormatICU4NMessageFormatCustomgettext
LicenseMITMITMITN/AGPL/LGPL
Complete CLDRYesYesPartialNoYes
Native dependencyNoYes (ICU)NoNoNo
Size~50 KB~30 MB~20 KB0Variable
.NET documentationGoodLowLowN/ALow
JSON integrationEasyPossiblePossibleN/AIncompatible
  • Correct pluralization for all languages without native dependency
  • Concise and readable syntax in JSON translation files
  • Lightweight: no significant impact on package size
  • Extensible: custom formatters for specific business cases
  • SmartFormat has its own syntax (not a pure ICU MessageFormat standard)
  • If a switch to ICU MessageFormat becomes necessary, translation file migration required