If I'm remembering correctly, you should be able to override this in
your localization yaml files for your project.
The keys of interest for what you're wanting to do are here:
http://github.com/rails/rails/blob/6d4a4fabbbb04c20cee51c4e374045cc75e2ec16/actionpack/lib/action_view/locale/en.yml

All you *should* have to do is create/update a translation yml file in
your project, make sure it's in your I18n load path, then use one of
the ActionView number helpers and the output should be localized the
way you want. Most all of the ActionView helpers lookup translation
keys for these kinds of things. So if your application has those keys
values overridden, those will be used instead.

Not sure that helps, but worth a try.
-Brian

On May 22, 8:30 am, Clemens Kofler <clem...@railway.at> wrote:
> Hi guys,
>
> I was wondering if there's any interest in including support for
> localized numbers directly in Rails core.
>
> Example:
>   @product.price = '19,95' # => 19.95
>
> There's a really simply way to get this done as can be seen 
> athttp://github.com/clemens/delocalize/blob/f6b3dcf3203612c41baeb0f3c0a...
> (line 41). In addition it would probably make to include something
> similar to the FormHelper hack I used in this plugin so text fields
> localize the number 
> (seehttp://github.com/clemens/delocalize/blob/f6b3dcf3203612c41baeb0f3c0a...).
>
> I'm definitely sure the Date/Time stuff in this plugin isn't ready for
> core but the Number stuff IMO is pretty simple and unobtrusive.
>
> Any opinions on that? I can submit a patch with tests at any time.
> - Clemens
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-core+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to