All Projects → wpiekutowski → polish-number

wpiekutowski / polish-number

Licence: Unknown, GPL-2.0 licenses found Licenses found Unknown LICENSE GPL-2.0 COPYING
polish-number has been renamed to polish_number and moved to https://github.com/amberbit/polish_number

Programming Languages

ruby
36898 projects - #4 most used programming language
polish-number has been renamed to polish_number and moved to github.com/amberbit/polish_number

polish-number

Translates numbers to Polish words

Installation

Tested with Ruby 1.8.7 and 1.9.2.

gem install polish-number

Usage

require 'polish_number'

PolishNumber.translate(1234) #=> tysiąc dwieście trzydzieści cztery
PolishNumber.translate(34, :currency => :PLN) #=> trzydzieści cztery złote
PolishNumber.translate(12, :currency => :PLN) #=> dwanaście złotych

Running specs

rake test

TODO

  • currently works for numbers 0-999999. Make it work with millions, billions, etc

  • optional noun pluralization

GitHub

github.com/wpiekutowski/polish-number

Credits

polish-number is maintained by Wojciech Piekutowski.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].