>From the API documentation:
http://api.rubyonrails.org/classes/ActionView/Helpers/NumberHelper.html#M000333
number_to_currency(number, options = {})
Formates a number into a currency string. The options hash can be used
to customize the format of the output. The number can contain a level
of precision using the precision key; default is 2 The currency type
can be set using the unit key; default is "$" The unit separator can
be set using the separator key; default is "." The delimiter can be
set using the delimiter key; default is "," Examples:
number_to_currency(1234567890.50) => $1,234,567,890.50
number_to_currency(1234567890.506) => $1,234,567,890.51
number_to_currency(1234567890.50, {:unit => "£",
:separator
=> ",", :delimiter => ""}) =>
£1234567890,50
On 7/23/05, Arie Kusuma Atmaja
<ariekusumaatmaja-f7czpFA4K2nQT0dZR+AlfA@public.gmane.org>
wrote:> bryce benton wrote:
> > number_to_currency(1234567890.506) => $1,234,567,890.51
> BTW agile book does mention this ..
>
> will this number_to_currency(x) be internationalized ? or i can set it
> to Indonesian for example (or to any other languages rather than just
> English) ?
>
> --
> Salam hangat,
> <%= Arie %> | http://blog.riyari.com | Y!: riyari3
> email: ariekusumaatmaja_at_riyari_dot_com
> ariekusumaatmaja_at_gmail_dot_com
>
>
>
>
>
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>