International Currencies in ASP
February 21 2007
I have a love-hate relationship with the "SetLocale" function in ASP. A recent challenge was to build several international versions of a website. We wanted it have one code-base with different settings and translation files. ASP's "SetLocale" function was invaluable in getting this working correctly, but here are a few things you may want to pay attention to in a similar situation, especially in regard to setting currency display :
* Currently there is no "Euros" locale. With a Windows XP 2003 server, the only locale setting that shows Euro format for currency is "es-es" (which is Spain). So, if you want your German site to show currency as Euros using ASP's "FormatCurrency" function, you have to set the locale to Spain. It works, but doesn't seem ideal. Perhaps have a setting for "Currency-Locale" which you set before displaying any currency on your site, and then switch back to the original locale once you display?
* Notice above I said, "Windows XP 2003" as the OS...If you happen to have an older OS (in our case, one of our TEST servers is an older OS), your road is more difficult...you just have to trust that Euros will work on a properly updated server...either that or the headaches of trying to write your own CurrencyFormat function.
As long as you are aware of the above issues, you should be all set. A great summary I found for this issue is at this site.
- Denis
- ASP, Internationalization
- Comments
- 0 comments