Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
418 views
in Technique[技术] by (71.8m points)

formatting - Proper currency format when not displaying the native currency of a culture

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)?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...