Some businesses require internationalized catalogs, which can display product information in different languages, or display different sets of products to customers in different countries. A site that sells laptop computers with integrated modems, for example, might show different sets of products to customers in the US and the UK, taking into account the different keyboard layouts and telephony standards that prevail in those countries.

The CatalogTools component includes a property called alternateRepositories that lets you specify a mapping between symbolic names (called repository keys) and alternative repositories to use as the product catalog. You can then use customer locale as the repository key to determine which version of the catalog to display.

When the customer searches the catalog on an internationalized site, you want to make sure they search the catalog specific to their language or locale. You can do this by setting the search form handler’s repositoryKey property to the name that identifies the repository you want to search. The search form handler uses repositoryKey to retrieve the appropriate catalog from the CatalogTools component. If you don’t set repositoryKey, the standard catalog repository is used.

The repositoryKey property is typically set through a hidden input field in the search form, as in this example:

<dsp:input value='<dsp:valueof bean="Profile.locale"/>' type="hidden"

Using repositoryKey in conjunction with the alternateRepositories property of the CatalogTools component lets you ensure that customers see only the appropriate products when searching the catalog.

loading table of contents...