# Currency locale

**URL:** <https://www.ruby-forum.com/t/currency-locale/181172>\
**Category:** Rails I18n\
**Created:** [January 6, 2010, 9:03pm UTC](https://www.ruby-forum.com/t/currency-locale/181172 "2010-01-06T21:03:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 6, 2010, 9:03pm UTC](https://www.ruby-forum.com/t/currency-locale/181172/1 "2010-01-06T21:03:07Z")

</div>

Hi Andrey,

The API with t/translation methods is far better, thanks 🙂

Important thing is ability to localize currencies. Locales need to  
convey informations about:

- number of digits after decimal separator (which the user can  
overwrite if desired),
- where to put currency sign,

for example:

```
currency:
  format:
    format: "%n %u"
    unit: "PLN"
    sign: "zÅ‚"

```

Some inspirations can be found here:

> <https://github.com/svenfuchs/rails-i18n/tree/master/rails/locale/>
>
> //github.com/svenfuchs/rails-i18n/tree/master/rails/locale/

[http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/i18n/client/NumberFormat.html](http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/i18n/client/NumberFormat.html)

> **[Customizing Formats (The Java™ Tutorials \>        
           ...](https://docs.oracle.com/javase/tutorial/i18n/format/decimalFormat.html)**
>
> This internationalization Java tutorial describes setting locale, isolating locale-specific data, formatting data, internationalized domain name and resource identifier

[http://rubyforge.org/pipermail/railsi18n-discussion/2006-July/000065.html](http://rubyforge.org/pipermail/railsi18n-discussion/2006-July/000065.html)

Maybe I have an old version of R18n library, but it should let you  
pass BigDecimal number to locale method. For some business apps you  
cannot rely on Floats (because of rounding issues).

Kind regards,  
Dawid
