Tutorials > Customize > Create a multicultural store

< Previous | Next >


Configure bootstrap files

In order to create a multicultural store, first have the bootstrap files to support the new languages and currencies.

In this step of the tutorial, we will perform two tasks:

Update main bootstrap files and load

WebSphere Commerce comes with many languages ready to be used by a store. Each language is associated with a particular country. In this tutorial, you load Canadian languages and the Canadian currency. First, you identify the wcs.bootstrap_base.xml file within the WCDE_INSTALL\schema\xml\ directory and include the new store languages. You can reuse an entry in the file:

<language language_ localename="en_US" language="en" country="US" encoding="UTF-8" mimecharset="iso-8859-1" />

Update attributes for Canadian English and Canadian French languages:

language_id

unique numeric value

language

en

English

fr

French

country

CA represents Canada

localename

The language value and the country value separated by an underscore (_).

encoding

UTF-8

mimecharset

iso-8859–1

The resulting language entries for Canada are:

<language language_ localename="en_CA" language="en" country="CA" encoding="UTF-8" mimecharset="iso-8859-1" /> 

<language language_ localename="fr_CA" language="fr" country="CA" encoding="UTF-8" mimecharset="iso-8859-1" /> 

The following steps are required to update and reload the main WebSphere Commerce bootstrap file:


Procedure

  1. Update the wcs.bootstrap_base.xml bootstrap file.

    1. Open the WC_INSTALL\schema\xml\ directory, and locate the wcs.bootstrap_base.xml file.

    2. Make a backup of this file and name the backup wcs.bootstrap_base.xml.original

    3. Open the file for editing, and search for the following element:

      <language language_ localename="en_US" language="en" country="US" encoding="UTF-8" mimecharset="iso-8859-1" /> 
      

    4. After that line, create two new language element entries. This enables bootstrap files to reference the language primary keys:

      <language language_ localename="en_CA" language="en" country="CA" encoding="UTF-8" mimecharset="iso-8859-1" />
      

      <language language_ localename="fr_CA" language="fr" country="CA" encoding="UTF-8" mimecharset="iso-8859-1" />
      

    5. Save this file.

  2. Edit the wcs.dtd file:

    1. Open the file WC_INSTALL\schema\xml\wcs.dtd

    2. Backup of the file to wcs.dtd.original.

    3. Open the wcs.dtd file. Find the line:

      <!ENTITY en_US "-1">
      

    4. Add these entries:

      <!ENTITY en_CA "124">
      <!ENTITY fr_CA "125">
      

    5. Save this file.

  3. Load the main bootstrap files:

    1. Download and extract the zip file included in this tutorial, and locate the env.bat file.

    2. Open the file env.bat in a text editor and update the file to represent the environment, specifically the WCSHOME and ToolKitHome properties

    3. Open a command prompt, browse to the directory where you extracted the included zip file.

    4. Run the script massload_main.bat

  4. Create multilanguage bootstrap files for Canadian English:

    1. Copy the WC_INSTALL\schema\xml\wcs.bootstrap_multi_en_US_base.xml to WC_INSTALL\schema\xml\wcs.bootstrap_multi_en_CA_base.xml

    2. Open the wcs.bootstrap_multi_en_CA_base.xml file.

    3. Search for <languageds language_ description="United States English" language_id_desc="-1" />

    4. Create two languageds element entries. The value of the description displays on store pages and in the WebSphere Commerce Accelerator when a user selects a language.

      <languageds language_ description="Canadian English" language_id_desc="124" />
      <languageds language_ description="Canadian French"  language_id_desc="125" />
      

    5. Add language descriptions for all other supported languages. This enables other languages to translate for this locale.

      <languageds language_ description="Canadian English" language_id_desc="124" />
      <languageds language_ description="Canadian English" language_id_desc="124" /> 
      <languageds language_ description="Canadian English" language_id_desc="124" /> 
      <languageds language_ description="Canadian English" language_id_desc="124" /> 
      <languageds language_ description="Canadian English" language_id_desc="124" /> 
      <languageds language_ description="Canadian English" language_id_desc="124" /> 
      <languageds language_ description="Canadian English" language_id_desc="124" /> 
      <languageds language_ description="Canadian English" language_id_desc="124" /> 
      <languageds language_ description="Canadian English" language_id_desc="124" /> 
      <languageds language_ description="Canadian English" language_id_desc="124" /> 
      

      Alternately, you could add supported languages in each of the wcs.bootstrap_multi_locale_base.xml files.

    6. Replace all references from en_US to en_CA (this change references the new locale multi base file)

    7. Save this file.

  5. Create multilanguage bootstrap files for Canadian French:

    1. Copy the WC_INSTALL\schema\xml\wcs.bootstrap_multi_fr_FR_base.xml to WC_INSTALL\schema\xml\wcs.bootstrap_multi_fr_CA_base.xml

    2. Open the wcs.bootstrap_multi_fr_CA_base.xml file. Replace all references of &fr_FR; to &fr_CA; (value used in language_id).

    3. Create two languageds element entries under that line in order to allow the Canadian English language to translate other languages:

      <languageds language_ description="Canadian English" language_id_desc="124" />
      <languageds language_ description="Canadian French" language_id_desc="125" />
      

    4. Create all other languageds element entries to allow other languages to have a translation for this locale. Instead of updating every single wcs.bootstrap_multi_locale_base.xml file, we instead provide an entry for each locale within the Canadian French locale file.

      <languageds language_ description="Canadian French" language_id_desc="125" />
      <languageds language_ description="Canadian French" language_id_desc="125" />
      <languageds language_ description="Canadian French" language_id_desc="125" />
      <languageds language_ description="Canadian French" language_id_desc="125" />
      <languageds language_ description="Canadian French" language_id_desc="125" />
      <languageds language_ description="Canadian French" language_id_desc="125" />
      <languageds language_ description="Canadian French" language_id_desc="125" />
      <languageds language_ description="Canadian French" language_id_desc="125" />
      <languageds language_ description="Canadian French" language_id_desc="125" />
      <languageds language_ description="Canadian French" language_id_desc="125" />
      

    5. Replace all references of &fr_FR; to &fr_CA; (this change references the new locale multi base file)

    6. Save this file.

    1. Within the WC_INSTALL\schema\xml\ directory, locate all the remaining files starting with wcs.bootstrap_multi_en_US_*.xml (excluding wcs.bootstrap_multi_en_US_base.xml).

    2. Make a copy of each file found in the previous step and rename it from wcs.bootstrap_multi_en_US_*.xml to wcs.bootstrap_multi_en_CA_*.xml. For example, the new copy of wcs.bootstrap_multi_en_US_contract.xml gets renamed to wcs.bootstrap_multi_en_CA_contract.xml.

    3. Open each of the files created in the previous step for editing replace all references of &en_US;to &en_CA; (value used in language_id)

    4. Save all the files.

    5. Within the WC_INSTALL\schema\xml\ directory, locate all the remaining files starting with wcs.bootstrap_multi_fr_FR_*.xml (excluding wcs.bootstrap_multi_fr_FR_base.xml).

    6. Copy each file found in the previous step and rename it from wcs.bootstrap_multi_fr_FR_*.xml to wcs.bootstrap_multi_fr_CA_*.xml. For example, the new copy of wcs.bootstrap_multi_fr_FR_contract.xml gets renamed to wcs.bootstrap_multi_fr_CA_contract.xml.

    7. Open each of the files created in the previous step for editing, replace all references of &fr_FR; to &fr_CA; (value used in language_id)

    8. Save all the files.

  6. Copy wcs.bootstrap_multi_en_US_*.xml to

  7. Load the multilanguage bootstrap files:

    1. Open a command prompt, browse to the directory where you extracted the included zip file.

    2. Run the script massload_en_CA.bat .

    3. Run the script massload_fr_CA.bat.
    After successfully loading these two new language bootstrap files into the database, WebSphere Commerce can include related multicultural data into the system.

You have now updated the main bootstrap to include the new languages, and created new language specific bootstrap files to support the new languages.

In the next step of the tutorial you learn how to include the new languages in the WCS instance.

< Previous | Next >


+

Search Tips   |   Advanced Search