# \[ANN\] NumbersToWords

**URL:** <https://www.ruby-forum.com/t/ann-numberstowords/60118>\
**Category:** Rails\
**Created:** [May 10, 2006, 1:45pm UTC](https://www.ruby-forum.com/t/ann-numberstowords/60118 "2006-05-10T13:45:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![beachguy82](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/9dc877/32.png) [@beachguy82](https://www.ruby-forum.com/u/beachguy82)\
**Post date:** [May 10, 2006, 1:45pm UTC](https://www.ruby-forum.com/t/ann-numberstowords/60118/1 "2006-05-10T13:45:13Z")

</div>

= numbersToWords - convert your integers and floats to english or  
japaneese words,or translate it into american currency

- This plugin was created from a solution to the ruby quiz (english  
numbers) by Matthew D Moss. I modified the code to work as a rails  
plugin and added the to\_dollars method.
- the to\_dollars method will work with integers and floats
- the to\_english and to\_japaneese methods will only work with integers.  
If you have call these methods on a float, it will be converted to an  
integer before translating.

= Examples  
123.to\_english == one hundred and twenty-three  
123.to\_japaneese == hyaku niju san  
123.to\_dollars == one hundred and twenty-three dollars  
money = 123.23  
money.to\_dollars == one hundred and twenty-three dollars and  
twenty-three cents  
money = 1.01  
money.to\_dollars == one dollar and one cent

= Install script/plugin install  
[http://svn.recentrambles.com/plugins/numbersToWords](http://svn.recentrambles.com/plugins/numbersToWords)

= License  
Ruby’s - Do whatever you want whenever you want, with any part or all  
of this code.

= Contributions  
you can send patches, questions, or feature requests to  
removed\_email\_address@domain.invalid

= Thank You Ruby Q. and Matthew D Moss

Charlie B.  
[www.recentrambles.com](http://www.recentrambles.com)

---

<div class="post-metadata">

**Author:** ![beachguy82](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/9dc877/32.png) [@beachguy82](https://www.ruby-forum.com/u/beachguy82)\
**Post date:** [May 10, 2006, 4:09pm UTC](https://www.ruby-forum.com/t/ann-numberstowords/60118/2 "2006-05-10T16:09:55Z")

</div>

## Posted at [http://agilewebdevelopment.com/plugins/show/112](http://agilewebdevelopment.com/plugins/show/112) 🙂

Benjamin C.  
[http://www.tesly.com/](http://www.tesly.com/) – Collaborative test case management  
[http://www.agilewebdevelopment.com/](http://www.agilewebdevelopment.com/) – Resources for the Rails community

---

<div class="post-metadata">

**Author:** ![beachguy82](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/9dc877/32.png) [@beachguy82](https://www.ruby-forum.com/u/beachguy82)\
**Post date:** [May 10, 2006, 6:12pm UTC](https://www.ruby-forum.com/t/ann-numberstowords/60118/3 "2006-05-10T18:12:39Z")

</div>

The .to\_dollars does not work “and” means decimal so,  
" money = 123.23  
money.to\_dollars == one hundred and twenty-three dollars and  
twenty-three cents"  
now if I were to put that back into numbers this is how it grammerly  
should come out: 100.23.23  
thats one error, but, besides that great work 🙂

---

<div class="post-metadata">

**Author:** ![beachguy82](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/9dc877/32.png) [@beachguy82](https://www.ruby-forum.com/u/beachguy82)\
**Post date:** [May 10, 2006, 7:40pm UTC](https://www.ruby-forum.com/t/ann-numberstowords/60118/4 "2006-05-10T19:40:11Z")

</div>

Thanks, someone pointed that out to me earlier. It’s been fixed. a  
fresh install of the plugin should fix your problem.

Charlie B.  
[www.recentrambles.com](http://www.recentrambles.com)
