What is the globally accepted way of displaying international currencies?
For example: US$20, $20, $20 (US), €20, 20€, etc?
If there are many ways to show each currency, what is a good general way of showing currency?
I didn't find any single way. That said:
Show the amount (obviously)
Show the ISO currency code
Optionally show a user-friendly symbol
Don't rely on $ or £ -- several currencies use these symbols. ISO currency codes make it unambiguous. I usually do:
[user-friendly-symbol][amount] [iso code]
For example, $100 USD or €2,000,000 EUR
For the thousand separator, I usually take the local user's preference, rather than trying to figure out if that currency is generally formatted with , or .
See ISO 4217
ISO Currency Codes are the standard, although you might want to special-case certain common currencies (eg, USD, GBP, JPY, EUR etc) and display their symbols too.
ISO 4217
This has been a popular issue around here. See if any of these help you out:
Best Practice - Format Multiple Currencies
Proper currency format when not displaying the native currency of a culture
Currency formatting
I think it's generally accepted this is the best way to do it:
USD$30
AUS$40
And these currencies are displayed like this by default:
£20
€20
The ISO 4217 currency code plus the value. So USD20, EUR20.
I do not work in this field but I believe it should be displayed with a 3 letter code after the sum like :
20 EUR
105 GBP
86.4 USD
There are so many countries using dollars, francs (except France, using euros now) and so on
There is still the problem of the separators:
1,000,000.00 USD but
1 000 000,00 EUR here in France
Related
I have a situation where I need to convert between ISO 3166 country codes.
For example, using the ISO 3 standard for country codes, IOT is the alpha code for British Indian Ocean Territory and 086 is it's numeric equivalent.
Another example would be using the ISO 4 for currency codes, 'UZS' is the alpha code for Uzbekistan and 860 is it's numeric equivalent.
You can find machine-processable lists of ISO 3166 country codes in a few places, e.g.:
in plain text format: http://download.geonames.org/export/dump/countryInfo.txt
in JSON: https://github.com/mledoze/countries (check the file countries.json, which contains much more than just country codes; the README describes its structure).
See also Full list of ISO ALPHA-2 and ISO ALPHA-3 country codes on GIS Stack Exchange.
I have two language shop (Polish and English) and I allow to pay in three different currencies. Problem is in display currency symbol. It's depend on language, not currency
Example:
(I choose currency Euro in English store view)
Display: Euro 1
Should display: 1 Euro
(In Polish shop currency= $, language = PL)
Display: 100 $
Should: $ 100
Where can I change it, to display symbol not as language "say" but as currency should look like?
P.S. I found something like that:
Currency Symbol in magento
but this changed global pattern of currency, not specific one.
See this link
1. Go from your root folder to /lib/Zend/Locale/Data
2. Find the lenguage file. In my case es.xml
3. Look for <currencyFormat>
Before
<currencyformatlength>
<currencyformat>
<pattern>¤ #,##0.00</pattern>
</currencyformat>
</currencyformatlength>
After
<currencyformatlength>
<currencyformat>
<pattern>#,##0.00 ¤</pattern>
</currencyformat>
</currencyformatlength>
I've been using the MMMM yyyy unicode date time format http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_Patterns to generate Month Year. It works great in English and various Latin-based languages. But I'm getting a complaint that the dates are incorrect in Finnish.
The dates that are being generated (by NSDateFormatter on the Mac) are like this:
kesäkuuta 2014
toukokuuta 2014
huhtikuuta 2014
But they should be -- at least, according to a Finnish user of our software:
kesäkuu 2014
toukokuu 2014
huhtikuu 2014 …
I don't know Finnish, so I don't understand how the ta suffix works. Anyhow, does anybody know how to specify some variation on the date formatter that properly formats the date in Finnish, without messing up the rest of the languages?
(I've tried using MMM but that keeps the ta suffix but doesn't change it, AND is abbreviates the months in English, so that's not it.)
According to this IBM page, it looks like MMMM doesn't include the ta. http://publib.boulder.ibm.com/infocenter/forms/v3r5m0/index.jsp?topic=/com.ibm.form.designer.locales.doc/i_xfdl_r_formats_fi_FI.html Hard to imagine it's a bug in Mac OS though.
Or, another Google search shows that IBM had a bug like this: http://www-01.ibm.com/support/docview.wss?uid=swg1OA22258
Anyhow, are there any Mac developers who know Finnish, who understand this issue, and what might be going on?
OK, I reported this as a bug to apple, and I got back a pretty helpful reply, so I thought I would share it here.
Engineering has determined that this is an issue for you to resolve based on the following:
You should never be setting the format "MMMM yyyy" directly in NSDateFormatter if you want to work in various languages; some may have the year first, etc.
If you want a format that uses full month name MMMM + year, you should pass that as a "template" to NSDateFormatter dateFormatFromTemplate: like so:
NSString* format = [NSDateFormatter dateFormatFromTemplate:#"yMMMM" options:0 locale: locale];
For a Finnish locale, this results in the date format "LLLL y" which will produce the proper nominative form of the month names: tammikuu, helmikuu, maaliskuu, etc.
Many languages including Finnish and many Slavic languages use a nominative form of the month name without a day number, and a genitive form or some related form (partitive for Finnish) for month name with day number. NSDateFormatter has both, with MMMM referring to the genitive form and LLLL referring to the nominative form. [NSDateFormatter dateFormatFromTemplate ...] can determine which one to use based on what fields are in the template. So you provide a template specifying either MMMM or LLLL and it will be mapped to the correct form in the resulting format.
Note that in such templates, space and punctuation are ignored; they will be determined as part of the data on correct date formats for the specifed locale.
For more information on pattern character such as MMM and LLL, see
http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
For information on dateFormatFromTemplate, see
https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSDateFormatter_Class/Reference/Reference.html#//apple_ref/occ/clm/NSDateFormatter/dateFormatFromTemplate:options:locale:
The problem here is something the developer needs to address in their usage of NSDateFormatter; NSDateFormatter is behaving as intended.
Just noticed, I left out an important part: After getting the format string by passing a template to
[NSDateFormatter dateFormatFromTemplate...]
then that format string is the one that should be set in
[NSDateFormatter setDateFormat:...]
(perhaps that is obvious but it is worth saying)
I need to display store currency in pound.
but for payment gateway authorize.net, I need to do online transaction in dollar.
So We decided to set display currency pound and base currency dollar.
I have done like following,
Tab : General / Currency setup
Base Currency : US Dollar
Default Display Currency : British Pound Sterling
Allowed Currencies : US Dollar, British Pound Sterling
but in frontend dollar is displayed.
I have only one store. So what could be the issue?
you can use English language in magento.
Open lib/Zend/Locale/Data/en.xml
find
< currency type="USD" >
Add code
:
< symbol >£< /symbol >
before close < /currency>
I am maintaining an app for a client that is used in two locations. One in England and one in Poland.
The database is stored in England and uses the format £1000.00 for currency, but the information is being gathered locally in Poland where 1000,00 is the format.
My question is, in VB6 is there a function that takes a currency string in a local format and converts to another, or will I just have to parse the string and replace , or . ?
BTW I have looked at CCur, but not sure if that will do what I want.
The data is not actually stored as the string "£1000.00"; it's stored in some numeric format.
Sidebar: Usually databases are set up to store money amounts using either the decimal data type (also called money in some DBs), or as a floating point number (also called double).
The difference is that when it's stored as decimal certain numbers like 0.01 are represented exactly whereas in double those numbers can only be stored approximately, causing rounding errors.
The database appears to be storing the number as "£1000.00" because something is formatting it for display. In VB6, there's a function FormatCurrency which would take a number like 1000 and return a string like "£1000.00".
You'll notice that the FormatCurrency function does not take an argument specifying what type of currency to use. That's because it, along with all the other locale-specific functions in VB, figures out the currency from the current locale of the system (from the Windows Control Panel).
That means that on my system,
Debug.Print FormatCurrency(1000)
will print $1,000.00, but if I run that same program on a Windows computer set to the UK locale, it will probably print £1,000.00, which, of course, is something completely different.
Similarly, you've got some code, somewhere, I can't tell where, in Poland, it seems, that is responsible for parsing the user's string and converting it to a number. And if that code is in Visual Basic, again, it's relying on the control panel to decide whether "." or "," is the thousands separator and whether "," or "." is the decimal point.
The function CDbl converts its argument to a number. So for example on my system in the US
Debug.Print CDbl("1.200")
produces the number one point two, on a system with the Control Panel set to European formatting, it would produce the number one thousand, two hundred.
It's possible that the problem is that you have someone sitting a computer with the regional control panel set to use "." as the decimal separator, but they're typing "," as the decimal separator.
What database are you using? And what data type is the amount stored in?
As long as you are always converting from one format to another, you do not need to do any parsing, just replace "." with "," or the other way around. You may need to remove the "£"-sign as well if that is stored in your string.
There's probably a correct answer dealing with culture objects and such, but the easiest way would be to taken the input from the polish input, and replace the , with a ., and then store it in your database as type "money" or "decimal". If you know they (possibly configurable per user) are always entering numbers in either Polish or English, you could have a function that you run all the input numbers through to convert the string to a proper "decimal" typed variable. Also, for display purposes you could run it through another similar function to ensure that the user always sees the number format they are comfortable with. The key here is to switch it to a decimal as soon as you get it from the user, and only switch it back to a string at the last step before sending it out to the user.
#KiwiBastard yes i would think so. Are you storing your amount in an "(n)varchar" field or are you using a currency/decimal type field? If the latter is the case, the currency-symbols and separators are added by your client, and there would be no need to replace anything in the database.