Configuring bootstrap files
In this lesson, you are configuring the bootstrap files required to support the new languages to your WebSphere Commerce instance. You must update the main bootstrap file and create the multi-language bootstrap files and load the files to add the language support.
In
this step of the tutorial, you complete the following tasks: customize
bootstrap files to include a new locale; create multi-language bootstrap
files. The list of supported languages is defined in the LANGUAGE
table. To support a new language, you must first add the language
to this table. The wcs.bootstrap_base.xml file
includes language entry elements for all locales available in WebSphere
Commerce.
Note: Bootstrap files are XML files used to populate database
tables with information, after the schema is created.
About this task
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, locate the wcs.bootstrap_base.xml file
within the WCDE_installdir\schema\xml\ directory
and include the new store languages. You can reuse an entry in the
file:
<language language_id="&en_US;" localename="en_US" language="en" country="US" encoding="UTF-8" mimecharset="iso-8859-1" />
Note: When you specify the language_id value
for your new language, use a negative numerical value starting at -1000 .
Do not use values from -1 to -999 because
these values are reserved for IBM use.
Update attributes
for Canadian English and Canadian French languages:
- language_id
- An identifier to uniquely identify the display format.
- language
- The name of the language.
- country
- The country or region for the language.
- localename
- A Java locale used to represent a political, geographical, or cultural region that has a distinct language and customs for formatting. The localename is the two-letter ISO 639 language code, followed by the two-letter ISO 3166 country code, separated by an underscore.
- encoding
- The character encoding value that the browser uses to display the page for this language. This should be the same encoding value used in your property files.
- mimecharset
- The character encoding used for MIME messaging. This value is different from the value used by browsers. For example, the de-facto character encoding for MIME messaging in Japan is iso-2022-jp, while the most commonly used character encoding in all other applications is Shift_JIS. in this example the following mimcharsets is used:
The resulting language entries for Canada are:
<language language_id="&en_CA;" localename="en_CA" language="en" country="CA" encoding="UTF-8" mimecharset="iso-8859-1" />
<language language_id="&fr_CA;" localename="fr_CA" language="fr" country="CA" encoding="UTF-8" mimecharset="iso-8859-15" />
The following steps are required to update and reload the main WebSphere Commerce bootstrap file: