What's the correct currency format in Belgian Dutch?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 14:43:40

问题


I'm formatting some currency in Java. This piece outputs 9,99 €

    final NumberFormat nf = NumberFormat.getCurrencyInstance(new Locale("nl", "BE"));
    nf.setCurrency(EUR);
    nf.format(new BigDecimal("9.99"));

but one of our payment providers, which returns amounts preformatted, outputs € 9,99

Which is correct for nl-BE?

And more programming related, if it turns out the payment provider, and not Java, is correct, how do I fix the Java way without hacks per locale (in the real code the Dutch in Belgium locale is not hardcoded)


回答1:


If Wikipedia is to be believed, neither is incorrect:

In Belgian Dutch, the euro sign can go before or after the amount, the latter being more common.




回答2:


Short answer: Nobody cares. You can use anyone.

Somewhat longer answer: If the amount appears in a sentence, 9,99 € is more usual. If it's at the bottom of an invoice, both are used. No wait, you could even use EUR instead of €.

BTW, most people even expect 9.99 € instead of 9,99€ simply because locale data was invented 25 years late.

Be aware though that this is the opinion of a fr-BE guy ;-)

This is the kind of stuff where I believe locale info tries too much to differentiate neighbouring cultures. Think of keyboards: There is a layout for fr-FR and one for fr-BE. Letters, digits and most punctuation signs are at the same position but a few characters such as <, > or @ are at different position on the keyboard. WTF!



来源:https://stackoverflow.com/questions/7570658/whats-the-correct-currency-format-in-belgian-dutch

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!