If you set up a separate product catalog for each language on the site, each product catalog is defined by an XML file. For example, the Pioneer Cycling site has a separate XML file for each of the three languages the site supports: frenchProductCatalog.xml, japaneseProductCatalog.xml, and a file productCatalog.xml that represents the standard English product catalog. If you decide to set up multiple product catalogs, you must to create database tables that mirror the English product tables. For example, Dynamo’s primary English SKU table is named dcs_sku. Pioneer Cycling uses equivalent tables for it’s French and Japanese SKUs named dfr_sku and djp_sku respectively. The first table is not re-used, despite the fact that all three tables have the same schema. All three tables contain matching data, the only difference is that the dfr_sku and djp_sku tables contain translated descriptions and prices that are specific to the French and Japanese locales.

To configure Dynamo to use multiple product catalogs, do the following:

  1. Create a catalog repository XML file that defines the product catalog. For more information, see the Catalog Repository section of this chapter.

  2. Create database tables that map to the catalog repository as described in the productCatalog.xml file.

  3. Copy the productCatalog.xml file and modify it as necessary for the other locales your site is supporting.

    You should rename this file so it is unique and recognizable for a certain locale. For example, you could rename the file frenchProductCatalog.xml.

  4. Create appropriately named database tables for each locale.

    For example, the Pioneer Cycling application adds the letters of the locale to the name of each table. Note that multi-byte languages require multi-byte character columns to hold the translated Strings.

  5. Populate the database tables with translated or otherwise locale-modified content. See Populating the International Catalogs with Product Data for more information.

  6. Create a separate Control Center component for each product catalog. For example, the Pioneer Cycling demo uses three components, ProductCatalog, FrenchProductCatalog, and JapaneseProductCatalog. Make sure that the definitionFiles property of each component points to the appropriate repository definition file. For example, the FrenchProductCatalog component’s definitionFiles property should point to the file at /atg/commerce/catalog/frenchProductCatalog.xml.

  7. Configure the alternateCatalogs property of the /atg/commerce/catalog/CatalogTools component.

    You can use the CatalogTools component to set up a relationship between multi-language repositories and their matching product catalogs. The alternateCatalogs property of the CatalogTools component specifies a mapping between repository keys and alternative repositories. For example, you can specify that the key fr_FR attached to a JSP should pull content from the French Product Catalog. If you don’t provide this mapping, the CatalogTools component reverts to the standard product catalog, even if the user’s request locale is not the same as the standard product catalog.

  8. Configure the useDefaultRepository and repository properties of the Nucleus component.

    Set the useDefaultRepository property to true if you want Dynamo to search the default repository when an item is not found in an alternate repository.

    Set the repository property to point to the default repository component.

For more information on how multiple product catalogs are set up in the Pioneer Cycling demo, see Adding Support for Multiple Locales in the Displaying and Accessing the Product Catalog chapter of the ATG Consumer Commerce Reference Application Guide.

Populating the International Catalogs with Product Data

When you want your site to have several duplicate catalogs, one for each language your site supports, you create the first language catalog, then create the second language catalog in one of the following ways:

Before you replicate your catalog data, it is important to decide whether an item in multiple catalogs should use the same ID in each. Depending on how your site is configured, having the same ID for a given item across catalogs may provide the following advantages:

If the listed advantages are actually disadvantages for your site, because, for example, your JSPs include hard-coded repository IDs that must access items in a specific catalog, assign each item a unique ID.

 
loading table of contents...