Skip to main content

cldr-spellout

Convert numbers to words across 89 locales

en42forty-two
de42zweiundvierzig
fr42quarante-deux
ru42сорок два
ja42四十二
ar42اثنان وأربعون
import { RuleBasedNumberFormat } from '@pointnet/cldr-spellout'; const fmt = RuleBasedNumberFormat.fromLocale('fr'); fmt.format(42); // → 'quarante-deux'

89 CLDR Locales

Built on Unicode CLDR data. Covers major world languages including right-to-left scripts, tonal languages, and complex grammatical systems like Polish or Arabic.

  • 42forty-two
  • 42اثنان وأربعون
  • 42四十二

Format & Parse

Convert numbers to spelled-out words, or parse words back to numbers. Supports ordinals, decimals, negatives, and locale-specific rule sets.

  • format(1001)"one thousand one"
  • format(1, '%digits-ordinal')"1st"
  • parse("twenty")20

Zero Runtime Dependencies

Only one dependency: the CLDR data package itself. Ships as dual ESM/CJS, fully tree-shakeable, with TypeScript types included.

  • installnpm i @pointnet/cldr-spellout
  • importRuleBasedNumberFormat
  • licenseMIT