Plugin: NumbersToWords

Published on Author Akhil Bansal1 Comment

In my RAILS application I need to convert numbers to words. I started writing own function but before I finish that I got an amazing Plugin.

This Plugin is capable to convert number to words.
Following are some examples

>> 5.to_english
=> “five”
>> 123456.to_english
=> “one hundred twenty-three thousand four hundred and fifty-six”
>> 2.5.to_english
=> “two”
>> (2.5).to_english
=> “two”
>> (2.5).to_dollars
=> “two dollars and fifty cents”
>> 5.to_japanese
=> “go”
>> (2.5).to_japanese
=> “ni”

install this plugin by :
script/plugin install

One Response to Plugin: NumbersToWords

  1. Hi!

    I just added a spanish module to your plug-in, where can I send you the patch?

    btw, the module behaves weird with really big numbers…… but it is related to the limited precision of the Float class.


    Ildefonso Camargo

Leave a Reply to Jose Ildefonso Camargo Tolosa Cancel reply

Your email address will not be published. Required fields are marked *