Skip to content

Java classes that can be used to convert numbers into words in different languages

License

Notifications You must be signed in to change notification settings

HuangGH/number2words

 
 

Repository files navigation

number2words

Java classes that can be used to convert numbers into words in different languages

usage

import com.mambu.number2words.api.NumberTranscriber;
import com.mambu.number2words.api.factories.NumberTranscriberFactory;

NumberTranscriber transcriber = NumberTranscriberFactory.newTranscriber(Locale.ENGLISH);

transcriber.toWords(new BigDecimal("1234"));    // returns "one thousand two hundred thirty four" 
transcriber.toWords(new BigDecimal("1234.12")); // returns "one thousand two hundred thirty four **and** twelve"

###Supported languages:

Locale Language Notes
Locale.ENGLISH English Short scale. Values over 10^12 overflow.
Locale.SIMPLIFIED_CHINESE Simplified Chinese Uses financial numerals. Values over 10^12 overflow.
Locale.forLanguageTag("es") Spanish Values over 10^12 overflow.

About

Java classes that can be used to convert numbers into words in different languages

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%