Rails 3 - Multiple Currencies
If I do this:
number_to_currency(100,:locale=>'en-GB')
I'd expect to get something like this:
£100.00
开发者_运维技巧
But instead I'm getting
$100
This is the same if I pass in the locale :en, 'fr-FR' or whatever.
Does Rails have a default list of currencies based on locale, or do I have to setup the I18 mappings for every country on the planet myself?
Any help appreciated.
Tobin
In the locale file, the currency unit is defined via
number:
currency:
unit: "$"
You have to do it yourself. This may help:
https://github.com/rails/rails/blob/master/actionpack/lib/action_view/locale/en.yml
精彩评论