Forum: Rails I18n currency locale

1cf6d8c52c05035a0a77883d7c6c6cfc?d=identicon&s=25 dmg (Guest)
on 2010-01-06 21:03
(Received via mailing list)
Hi Andrey,

The API with t/translation methods is far better, thanks :)

Important thing is ability to localize currencies. Locales need to
convey informations about:
- number of digits after decimal separator (which the user can
overwrite if desired),
- where to put currency sign,

for example:

    currency:
      format:
        format: "%n %u"
        unit: "PLN"
        sign: "zł"

Some inspirations can be found here:
http://github.com/svenfuchs/rails-i18n/tree/master...
http://google-web-toolkit.googlecode.com/svn/javad...
http://java.sun.com/docs/books/tutorial/i18n/forma...
http://rubyforge.org/pipermail/railsi18n-discussio...

Maybe I have an old version of R18n library, but it should let you
pass BigDecimal number to locale method. For some business apps you
cannot rely on Floats (because of rounding issues).

Kind regards,
Dawid
This topic is locked and can not be replied to.