B4A Library Convert Numbers to Words

Discussion in 'Additional libraries, classes and official updates' started by omidaghakhani1368, Jul 16, 2015.

  1. omidaghakhani1368

    omidaghakhani1368 Well-Known Member Licensed User

    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

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

    Attached Files:

  2. MarcoRome

    MarcoRome Expert Licensed User

    God job Omid ;)
    Is it possible convert also in another language ?

    opps... i see that you already ready for this :)
    Thank you
     
    ArminKH likes this.
  3. omidaghakhani1368

    omidaghakhani1368 Well-Known Member Licensed User

    of course,now i should working hard on my project,when free my time i add new language
     
    asales and MarcoRome like this.
  4. ArminKH

    ArminKH Well-Known Member

    merci omid,good bashi ever;)
     
  5. NJDude

    NJDude Expert Licensed User

    Just make sure you deal with POSITIVE numbers, entering something like:
    Code:
    n2w.EnglishNumberToWords(-200)
    Will return the wrong result.
     
    thedesolatesoul and ArminKH like this.
  6. omidaghakhani1368

    omidaghakhani1368 Well-Known Member Licensed User

    Oooof i didn't understand but you can place "Minus" before word maybe?
     
  7. sorex

    sorex Expert Licensed 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
     
  8. Johan Schoeman

    Johan Schoeman Expert Licensed User

    Also applies to Afrikaans
    34 > vier-en-dertig
    128 > honderd agt en twintig
    :)
     
    Last edited: Aug 7, 2015
  9. jsanchezc

    jsanchezc Member Licensed User

    Good job!!, Thanks!!!
    I can help to add Spanish language, feel free to contact.
     
  10. PoleStar

    PoleStar Member Licensed User

    Nice Share :)
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice