Skip to content

i18n-num-in-words

A small library to convert numbers to words in different languages

Playground

one hundred twenty three

Getting Started

Terminal window
npm install i18n-num-in-words

Usage

import { indonesianNumInWords } from 'i18n-num-in-words';
indonesianNumInWords(1234567890);
// => 'satu miliar dua ratus tiga puluh empat juta lima ratus enam puluh tujuh ribu delapan ratus sembilan puluh'
import { englishNumInWords } from 'i18n-num-in-words';
englishNumInWords(1234567890);
// => 'one billion two hundred thirty four million five hundred sixty seven thousand eight hundred ninety'
import { arabicNumInWords } from 'i18n-num-in-words';
arabicNumInWords(1234567890);
// => 'مليار واحد ومائتان وأربعة وثلاثون مليون وخمسمائة وستة وسبعون ألف وثمانمائة وتسعون'

Features

Internationalized

95% of the world’s population speaks a language other than English. We get you covered.

Fully type safe

Enjoy the benefits of type safety and static type inference in TypeScript

Small bundle size

This package, i18n-num-in-words, is a small library with zero dependencies.

100% test coverage

We have -almost- 100% test coverage to ensure that the library works as expected.

Optimized for tree-shaking

This library is optimized for tree-shaking. Only the languages you use will be included in your bundle.