small medium large xlarge

Generic-user-small
10 Aug 2008, 15:40
Soh Dubom (2 posts)

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 which is very clear. 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

The doubts I have is:

  1. Setting Rails to understand another culture, like pt-br
  2. Should I configure Sqlite3 also to understand another culture? if so, how?

:-)

Samr_small_pragsmall
10 Aug 2008, 22:03
Sam Ruby (634 posts)

The “number_to_concurrency”:http://ap.rubyonrails.com/classes/ActionView/Helpers/NumberHelper.html#M000367 helper has a number of options, including :delimiter and :separator.

Currently in rails edge, and intended for Rails 2.2, is “increased I18n support”:http://www.artweb-design.de/2008/7/18/the-ruby-on-rails-i18n-core-api .

These changes are being discussed on the “rails-i18n”:http://groups.google.com/group/rails-i18n Google Group.

You must be logged in to comment