This is an extension to the original Ruby/Rails I18n project, that should be found in activesupport’s vendor directory. G3A::I18n gives you the ability to translate Integers and Floats through the well known I18n API, eg.:
require 'g3a/i18n' I18n.locale = :hu I18n.t 1234 # => "ezerkétszázharmincnégy" I18n.t(1234.0 + 1/6.0) # => "ezerkétszázharmincnégy és egy hatod"
And it provides ordinals too…
I18n.t 1234, :format => :ordinal # => "ezerkétszázharmincnegyedik"
You should install svenfuchs’ i18n gem prior to this one.
gem install svenfuchs-i18n --source http://gems.github.com/
gem install gbence-g3a_i18n --source http://gems.github.com/
G3A::I18n is released under the MIT-LICENSE license, see the included license file for further information. Suggestions, feedback, pull requests, patches, bug reports are mostly welcome to my github account or to [email protected].
Some part of this project is forked of László Németh’s localization project (hunspell.sourceforge.net/Soros.html), as well as the cloned gemspec and other misc files from Bálint Érdi’s (github.com/balinterdi) various projects.