unicode-org / icu4x

Solving i18n for client-side and resource-constrained environments.
https://icu4x.unicode.org
Other
1.39k stars 178 forks source link

Design and implement algorithmic numbering systems (RBNF) #595

Open sffc opened 3 years ago

sffc commented 3 years ago

Many people around the world use non-decimal numbering systems. CLDR calls these "algorithmic", and ICU implements them in RuleBasedNumberFormat (RBNF). Some use cases include:

  1. Chinese traditional numbering systems, including financial and calendrical
  2. Spellout, like "one", "two hundred", "fifteen thousand and three"
  3. Ordinal, like "1st", "2nd", "10th"

Before implementing RBNF in ICU4X, we should spend some time designing what a good modular API would look like, and how closely to tie it in with decimal formatting.

Manishearth commented 3 years ago

This would be implementing the RBNF part of UTS 35, though likely not parsing the CLDR XML format directly.