Skip to main content

cldr-spellout

Convert numbers to words across 89 locales

en42→forty-two
de42→zweiundvierzig
fr42→quarante-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.

  • 42→forty-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