I've looked around the questions and formatting prices with different currencies seems to be a recurring problem. I encountered a variation of this issue.

I have figured a format to display the price amount, say amount currencyCode. Now my amount will vary depending on the currency, because for instance 1 EUR is worth about 25000 VND. So my item (I treat items of a specific range of values, between 10 and 100 euros) might be displayed as 10 EUR as well as about 250000 VND, which show a very different size when displaying it. Also, I ignore the fractional part of the amount.

My question is therefore, is there a maximum length of amount I can expect (I consider my display strategy should be valid for any official currency, and the amount is the equivalent of 1 USD)? Or is there a known display strategy (maybe in Vietnam people only display the number of thousands of Dong, not the number of Dong)?

Do you only have round euro and dollar prices? I guess you’ll rather have 12.95 EUR etc., which is a bit closer in string length to 300,000 VND. Nevertheless, merchants in countries with low currency often do employ shortening strategies, but not everywhere and not always the same. (It’s been less than a year ago and I can’t remember how it was in Vietnam, but pretty sure it wasn’t ‘k’ notation.)
– CrissovOct 30 '15 at 14:56

3 Answers
3

Part of the issue is that it is constantly changing, so you would be better off not assuming a number. The Dong currently seems to be the highest, but other currencies have been higher in the past.

6,000,000,000 (6*10^9) gold yuan coin was issued by Xinjiang Provincial Bank in 1949, and in Germany in 1923, there was a 100,000,000,000,000 (10^14) mark bill. The Hungarian pengő, pictured above, reached a 2,000,000,000,000,000,000,000 (2*10^21) value.

Of course, these increases occurred in periods of extreme instability. You may decide that your application doesn't need to be designed to work for the currency of the loosing side of world war three. Also, many people in those countries would switch to purchasing in more stable foreign currencies.

In my opinion, don't apply a shortening strategy for the longer currency. Try to find the maximum possible case and the minimum case and design your experience to suit both cases, or make 2 variation for each currency if you are building localized versions for each country.

It looks like you're trying to implement a fixed width to a field where the number of character varies from one to six. If you do, there will be an unwanted space in the view which makes the user experience worse. From you example you'd display:

The price for this item is 10 EUR.
The price for this item is 250'000 VND.

Instead of trying to find the maximum number of characters in the amount field, developers often implement dynamic rendering of content. Not only will it be easier to read, but you will also have a system that is working even if there is a major inflation in a country, that you didn't expect. Currency exchange rates change every day, and we need to address that possibility too.

I don't think I said how I'm going to display it, that's really not my question. And I actually did not pick any strategy for that. Maybe I'll reduce the font size, maybe I'll cut after X numbers and somehow show a short representation of the remaining numbers. But you have a good point, whatever the strategy I pick, there will always be an unpredictable part. My fallback strategy is not very user-friendly so I'd like to limit its usage, and I thought there was an easy way I didn't know about.
– VinceDec 27 '15 at 10:48