Indexing a new language in WebSphere Commerce Search
You can add a language to be indexed in WebSphere Commerce Search, so that the search utilities, storefront, and Management Center can recognize more required locales.
WebSphere Commerce provides templates and samples for the following locales and
languages:
To add these languages to a store:
Language & Country or Region | Identifier |
---|---|
English (United States) | en_US |
French (France) | fr_FR |
German (Germany) | de_DE |
Italian (Italy) | it_IT |
Spanish (Spain) | es_ES |
Portuguese (Brazil) | pt_BR |
Chinese-simplified (China) | zh_CN |
Chinese-traditional (Taiwan) | zh_TW |
Korean (Korea, South) | ko_KR |
Japanese (Japan) | ja_JP |
Russian (Russia) | ru_RU |
Romanian (Romania) | ro_RO |
Polish (Poland) | pl_PL |
- Add support for the language to a store using the Store Management tool in the Management Center.
- Complete the steps outlined in this task to add a new language to be indexed.
- Complete the What to do next tasks to index the new language.
If more languages are added and supported for your WebSphere Commerce instance, for example,
Arabic (ar_EG
), you must create the locale-specific assets accordingly.
Before you begin
Procedure
-
Perform the following steps for the following files:
- WC_installdir/components/foundation/subcomponents/search/solr/home/template/CatalogEntry/conf/locale
- WC_installdir/components/foundation/subcomponents/search/solr/home/template/CatalogEntry/unstructured/conf/locale
- WC_installdir/components/foundation/subcomponents/search/solr/home/template/CatalogGroup/conf/locale
- WCDE_installdir\components\foundation\subcomponents\search\solr\home\template\CatalogEntry\conf\locale
- WCDE_installdir\components\foundation\subcomponents\search\solr\home\template\CatalogEntry\unstructured\conf\locale
- WCDE_installdir\components\foundation\subcomponents\search\solr\home\template\CatalogGroup\conf\locale
-
Create a folder for your locale.
For example, fr_BE indicates a French language locale for Belgium.
-
Create the necessary files for your new locale directory.
-
Open the schema.xml file and check if the tokenizer and filter factory are
suitable for the language.
For example, ensure that the rules apply for your preferred Language & Country or Region's Identifier. If necessary, save your changes and close the file.
- Optional: If there are any stop words for the language, create a file, stopwords.txt under the new directory for the schema.xml file. Save your changes and close the file.
-
Add your locale to the component configuration file on the Search EAR within the
<_config:valuemappingservice>
section of the file.For example:
For more information, see Changing properties in the component configuration file (wc-component.xml) (Search EAR).<_config:valuemapping externalName="Locale" internalName="langId"> <_config:valuemap externalValue="locale" internalValue="internal_identifier"/> </_config:valuemapping>