当不显示文化的本地货币时适当的货币格式 [英] Proper currency format when not displaying the native currency of a culture

查看:129
本文介绍了当不显示文化的本地货币时适当的货币格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果格式化货币不是当前文化的本地货币,那么格式化货币的正确方法是什么?

例如,如果我格式化美元作为fr-FR文化,我可以像美国文化那样格式化( $ 1,000.00 ),或作为fr-FR文化,但将欧元符号更改为美元符号( 1 000,00 $ )。也许别的东西( $ 1,000,000 1000,00 USD )?

解决方案<在这里没有绝对的规则,但有一些指导原则:


  1. 尝试并使用该语言环境的数字格式(例如1,000.00在美国将在德国显示为1'000,00);
  2. 请记住,不同的货币可以使用相同的符号(例如澳元和美元使用$)有许多货币符号;

  3. 如果您的网站是单一货币,那么就使用正确的货币符号。通过这个我的意思是像亚马逊,旅游网站,购物网站等网站。这些网站在某种意义上是单一货币。例如,他们不会同时展示马来西亚的环锭麻瓜和新加坡元;和

  4. 如果您的网站是多币种的,那么根本不要使用该符号:使用国际标准三字母货币代码,如 ISO 4217货币名称和代码元素。像xe.com这样的网站适合这个类别。


What is the proper way to format currency if you are formatting a currency that is not the native currency of the current culture?

For example, if I am formatting US Dollars for a fr-FR culture do I format it like a en-US culture ($1,000.00) or as an fr-FR culture but changing the Euro symbol to a US Dollar symbol (1 000,00 $). Perhaps something else ($1 000,00 or 1 000,00 USD)?

解决方案

There's no absolute rules here but a couple of guiding principles:

  1. Try and use the number format for that locale (eg 1,000.00 in the US would be displayed as 1'000,00 in Germany);
  2. Remember that different currencies can use the same symbol (eg $ is used by Australian and US Dollars) and that there are many currency symbols;
  3. If your site is "single" currency then just use the correct symbol for that currency. By this I mean sites like Amazon, travel sites, shopping sites and so on. These sites are single currency in the sense they are one currency at a time. They won't be displaying Malaysian Ringits and Singapore Dollars at the same time, for example; and
  4. If your site is multi-currency then don't use the symbol at all: use the international standard three letter currency code as defined by ISO 4217 currency names and code elements. Sites like xe.com fit into the category.

这篇关于当不显示文化的本地货币时适当的货币格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆