Technote (FAQ)
Question
After following the Information Center instructions to add currency formatting options to the CURFMTDESC table, the currency is still not displayed as expected. What else needs to be configured?
Cause
Currency formatting is based on the locale, not the CURFMTDESC table.
Answer
The prices displayed in the storefront come from:
WC_storesdir/<store>/Snippets/ReusableObjects/CatalogEntryPriceDisplay.jspf
In the following example, this snippet is added to the top of the JSPF file to detect the Spanish language setting and force the locale to en_US to make the currency symbol display correctly:
<!-- Locale setting -->
<%@ page import="com.ibm.commerce.command.CommandContext" %>
<c:set var="langId" value="${CommandContext.languageId}" scope="page" />
<c:if test="${langId == -5}">
<fmt:setLocale value="en_US"/>
</c:if>
You also must ensure that the languageId is passed in the URL when you select the language:
http://<hostname>/webapp/wcs/stores/servlet/TopCategoriesDisplay?catalogId=10001&storeId=10001&languageId=-5
Rate this page:
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.