Open viroulep opened 6 years ago
I see that the PR to fix that issue has already been merged: https://github.com/RubyMoney/money/pull/783
I saw that but I believe that's just a first step adding a formatting method to the Money class, but I'm not sure if the "locale to sign position" part is done.
I'll play a bit locally, but I'd rather not add a "number.currency.format.symbol_position" to our locale files, if it's going to be standardized somewhere (but as you noticed it would probably work).
Just found this, navigating from the Ruby Money issue.
Even though this issue is not recent, a small note: "This kind of made me laugh, as in all the countries using euro but 3 we display the sign after, yet the standard decided display it before..."
The "sign before" is not the standard. You saw that text, with the "sign after" exception, because you were looking at the English version of the text. If you access the corresponding page in Portuguese, for example, at http://publications.europa.eu/code/pt/pt-370303.htm#position (use Google Translate), you'll see that the text states the symbol comes after, with the exception being for those 3 which place the sign before.
When I introduced the currency formatting I kind of remember that I had to override some setting to have the '€' sign displayed after the price. This is not the case anymore because we probably changed the library in charge of displaying the fee(?), so I looked into what we're using now. Looks like the gem we're using is indeed following the iso specifications, which states:
This kind of made me laugh, as in all the countries using euro but 3 we display the sign after, yet the standard decided display it before...
Anyway the "correct" way to handle this is not to enforce it either way, but rather use a locale-based configuration.
Luckily this has been started over at RubyMoney/money#712, so I'll watch this issue and take care of bringing in/use the change when it's available.