Hi. Any Rails app has its culture set to EN-us, right? So :precision =>
8, :scale => 2 means numbers like -999,999.99 to 999,999.99. But suppose
you have to develop an app in another culture, eg PT-br
(portuguese-brazilian) then your numbers will have dots replaced by
commas and versa-vice, like: -999.999,99 to 999.999,99
I could use: number_with_delimiter(999,999.99, “.”, “,”) in my
models/views everytime I need to display it in the current culture, but
it´s against the DRY principles … there mst be a central place in
rails where I can set specific culture settings, right?
On Aug 10, 12:08 pm, Soh D. [email protected]
wrote:
Hi. Any Rails app has its culture set to EN-us, right? So :precision =>
8, :scale => 2 means numbers like -999,999.99 to 999,999.99. But suppose
you have to develop an app in another culture, eg PT-br
(portuguese-brazilian) then your numbers will have dots replaced by
commas and versa-vice, like: -999.999,99 to 999.999,99
Google search for “rails i18n” led to:
http://wiki.rubyonrails.org/rails/pages/Internationalization
which notes:
http://www.globalize-rails.org/
which has:
http://www.globalize-rails.org/pages/features
HTH.
Thanks Matt, that´s very useful place to look for info … 