I am using Rails 4
I have set the default locale to is in config/application.rb
is.yml is in config/locales
In Rails console I type
I18n.availa
You can create your default configuration of delimiter on locale. Like:
en:
format:
number:
delimiter: ','
pt-BR:
format:
number:
delimiter: '.'
After you set up this. You can call locale on normal delimiter like:
for pt-BR:
number_with_precision(6419336, precision: 2, delimiter:
I18n.t('number.format.delimiter')) #=> "6,419,336.00"
for en:
number_with_precision(6419336, precision: 2, delimiter:
I18n.t('number.format.delimiter')) #=> "6.419.336,00"