This content has been marked as final. Show 3 replies
In JSP , you can use following droplet :
<param name="currency" value="param:price.listPrice">
<param name="locale" value="en_US">
<param name="targetLocale" value="de_DE_EURO">
<param name="euroSymbol" value="€">
<valueof param="formattedCurrency" valueishtml>no price</valueof>
CurrencyConversionFormatter gets exchange rates from the ExchangeRates resource bundle. Most of the values in ExchangeRates were last updated in 2001. A couple of new currencies were added in 2002. They're obviously badly out of date. There is no provision in the code for updating the rates while a server is running. If you want to want to do real-time conversions, you may have to write your own converter with some provision for getting up-to-date rates periodically from an external system.
Instead of doing currency conversion, many customers create a separate price list for each currency they support. They can associate a price list with a shopper based on the shopper's locale, the site the shopper is on, or any other criteria that make sense. Prices for different currencies can be set independently, allowing for variations in different markets. Some merchants prefer all their prices to be round numbers (e.g., always ending in .00 or .50) no matter what the currency. Rate-based conversions don't produce pretty prices.