We currently have a crude mechanism to convert numbers to words (e.g. using a few static arrays) and based on the size of the number translating that into an english text. But we are running into issues for numbers which are huge.
10183 = Ten thousand one hundred eighty three
90 = Ninety
5888 = Five thousand eight hundred eighty eight
Is there an easy to use function in any of the math libraries which I can use for this purpose?
I implemented it like this
and the resource file is :
This one is implemented till 10 lakhs only
The same accepted answer (Jigar Joshi), but now in Spanish. Feel free to change this if you find a mistake. Easier than french, but based on that though....
Spanish:
I think this may help you...programme is very simple and works fine
I have written a clean version for 32-bit integers and american English:
http://www.source-code.biz/snippets/java/13.htm