Numbers to Words (JavaScript)
It converts a numeric value to words. You can use it as standalone js library or as Node module.
Example
var T2W = require('numbers2words'); // import from node modules
var translator = new T2W("EN_US");
// one thousand two hundred thirty-four
translator.toWords(1234)
Now available locales
- idAR (0...999999999) in progress - frFR (0...999999999) - esES (0...999999999) - idID (0...999999999) - itIT (0...999999999) - deDE (0...999999999) - enUS (0...999999999) - csCZ (0...999999999) You can implement your locale vocabulary. For additional locale send pull request with locale file + tests. Locale object The locale object must implement method translate./**
* Translate numbers to words
* @public
* @param {array} numbers
* @param {number} index
* @return {string}
*/
translate( numbers, index){
// implement it
};