Setting the currency suffix

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:

(0 users)Average rating

Add comments

Document information


More support for:

WebSphere Commerce Enterprise
Contracts / Pricing / Offer

Software version:

6.0, 7.0

Operating system(s):

AIX, IBM i, Linux, Solaris, Windows, i5/OS

Reference #:

1615738

Modified date:

2012-11-19

Translate my page

Machine Translation

Content navigation