B4A Library Convert Numbers to Words

Hi.
With this library you can convert numbers to words
example : convert 1200000000 to "one billion two hundred million"
in next version add other language to library if it is good

B4X:
     Dim i As Number2Words
     Log(i.EnglishNumberToWords(1200000000))
 

Attachments

  • Archive.zip
    2.2 KB · Views: 325

omidaghakhani1368

Well-Known Member
Licensed User
Longtime User
Just make sure you deal with POSITIVE numbers, entering something like:
B4X:
n2w.EnglishNumberToWords(-200)
Will return the wrong result.
Oooof i didn't understand but you can place "Minus" before word maybe?
 

sorex

Expert
Licensed User
Longtime User
you'll have fun with other languages. :)

In dutch (and german?) they start with the last part of the number than the first. (or last, first, second see below)

34 > thirty four (eng) > four and thirty (dutch and roughly translated)
128 > one hundred twenty eight > hundred eight and twenty
 

Johan Schoeman

Expert
Licensed User
Longtime User
you'll have fun with other languages. :)

In dutch (and german?) they start with the last part of the number than the first. (or last, first, second see below)

34 > thirty four (eng) > four and thirty (dutch and roughly translated)
128 > one hundred twenty eight > hundred eight and twenty
Also applies to Afrikaans
34 > vier-en-dertig
128 > honderd agt en twintig
:)
 
Last edited:

jsanchezc

Member
Licensed User
Longtime User
Good job!!, Thanks!!!
I can help to add Spanish language, feel free to contact.
 
Top