Localize money formatting with I18n
mainTo use the I18n gem for localized formatting (thousands separators, decimal marks, and symbol placement), set Money.locale_backend = :i18n. This relies on your translation files (e.g., en.yml) having the correct number.currency.format structure.
# Enable I18n localization
Money.locale_backend = :i18n
I18n.locale = :en
Money.from_cents(10_000_00, 'USD').format # => $10,000.00
I18n.locale = :es
Money.from_cents(10_000_00, 'USD').format # => $10.000,00