New Language Creation in WCS
Reference:
Creating Locale en_CA Steps:
( You can refer an existing language like en_US instead of en_GB here)
- Configuring bootstrap files from en_GB files
- Copy wcs.bootstrap_en_GB.xml and rename to wcs.bootstrap_en_CA.xml. Replace all occurrence of en_GB to en_CA
- Copy wcs.bootstrap_en_GB_base.xml and rename to wcs.bootstrap_en_CA_base.xml. Add following two lines in it
<language
language_id="&en_CA;" localename="en_CA"
language="en" country="CA" encoding="UTF-8"
mimecharset="iso-8859-1" />
<langpair
storeent_id="-1" language_id="&en_CA;"
language_id_alt="&en_US;" sequence="100" />
Note:
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:
iso-8859–1 -> en
iso-8859–15
->fr
- Edit the wcs.dtd file
Open
the wcs.dtd file. Find the line:
<!ENTITY
en_US "-1">
Add
these entries:
<!ENTITY en_CA "-1001">
<!ENTITY fr_CA "-1002">
<!ENTITY en_CA "-1001">
<!ENTITY fr_CA "-1002">
- Create multilanguage bootstrap files for Canadian English
- Copy wcs.bootstrap_multi_en_GB_base.xml and rename to wcs.bootstrap_multi_en_CA_base.xml.
Replace
all references from &en_GB; to &en_CA;
Search
for <languageds language_id="&en_CA;"
description="United States English" language_id_desc="-1"
/>
Add
one more for new language:
<languageds
language_id="&en_CA;" description="Canadian English"
language_id_desc="-1001" />
Add
language descriptions for all other supported languages to allow other
languages to have a translation for this locale:
<languageds
language_id="-1" description="Canadian English"
language_id_desc="&en_CA;" />
<languageds language_id="-2" description="Canadian English" language_id_desc="&en_CA;" />
<languageds language_id="-3" description="Canadian English" language_id_desc="&en_CA;" />
<languageds language_id="-4" description="Canadian English" language_id_desc="&en_CA;" />
<languageds language_id="-5" description="Canadian English" language_id_desc="&en_CA;" />
<languageds language_id="-6" description="Canadian English" language_id_desc="&en_CA;" />
<languageds language_id="-7" description="Canadian English" language_id_desc="&en_CA;" />
<languageds language_id="-8" description="Canadian English" language_id_desc="&en_CA;" />
<languageds language_id="-9" description="Canadian English" language_id_desc="&en_CA;" />
<languageds language_id="-10" description="Canadian English" language_id_desc="&en_CA;" />
<languageds language_id="-20" description="Canadian English" language_id_desc="&en_CA;" />
<languageds language_id="-21" description="Canadian English" language_id_desc="&en_CA;" />
<languageds language_id="-22" description="Canadian English" language_id_desc="&en_CA;" />
<languageds language_id="-23" description="Canadian English" language_id_desc="&en_CA;" />
<languageds language_id="-2" description="Canadian English" language_id_desc="&en_CA;" />
<languageds language_id="-3" description="Canadian English" language_id_desc="&en_CA;" />
<languageds language_id="-4" description="Canadian English" language_id_desc="&en_CA;" />
<languageds language_id="-5" description="Canadian English" language_id_desc="&en_CA;" />
<languageds language_id="-6" description="Canadian English" language_id_desc="&en_CA;" />
<languageds language_id="-7" description="Canadian English" language_id_desc="&en_CA;" />
<languageds language_id="-8" description="Canadian English" language_id_desc="&en_CA;" />
<languageds language_id="-9" description="Canadian English" language_id_desc="&en_CA;" />
<languageds language_id="-10" description="Canadian English" language_id_desc="&en_CA;" />
<languageds language_id="-20" description="Canadian English" language_id_desc="&en_CA;" />
<languageds language_id="-21" description="Canadian English" language_id_desc="&en_CA;" />
<languageds language_id="-22" description="Canadian English" language_id_desc="&en_CA;" />
<languageds language_id="-23" description="Canadian English" language_id_desc="&en_CA;" />
<languageds
language_id="-11" description="Canadian English"
language_id_desc="&en_CA;" />
<languageds
language_id="-1001" description="Canadian English"
language_id_desc="&en_CA;" />
- Copy wcs.bootstrap_multi_en_GB.xml and rename to wcs.bootstrap_multi_en_CA.xml. Replace all references from en_GB to en_CA.
- Locate all the remaining files that start with wcs.bootstrap_multi_en_GB_*.xml (excluding wcs.bootstrap_multi_en_GB_base.xml).
Make
a copy of each file found in the previous step and rename it
from wcs.bootstrap_multi_en_GB_*.xml to wcs.bootstrap_multi_en_CA_*.xml.
For example, rename the copy
of wcs.bootstrap_multi_en_GB_contract.xml to wcs.bootstrap_multi_en_CA_contract.xml.
Open
each of the files created in the previous step for editing; replace all
references of &en_GB; to &en_CA; (value used in
language_id).
- Save all files
- Unzip en_CA_fr_CAConfigFiles.zip from $TFS\BUILD\locales\Sharpie_CA and copy the files to <WCToolkit>\schema\xml\ directory
- Massload en_CA locale:
Loading Bootstrap Language Files into DB:
Steps:
Toolkit:
cd
to <WCToolkit>/bin
massload.bat
C:\WCDE_ENT70\schema\xml\wcs.bootstrap_en_CA.xml localdb db2admin db2admin DB2ADMIN
massload.bat
C:\WCDE_ENT70\schema\xml\wcs.bootstrap_multi_en_CA.xml localdb db2admin
db2admin DB2ADMIN
Linux Server (change db details accordingly)
/opt/IBM/WebSphere/CommerceServer70/bin/massload.sh
-dbname WCD1 -dbuser wsppusr -dbpwd wspc0nn3ct -infile
/opt/IBM/WebSphere/CommerceServer70/schema/xml/wcs.bootstrap_en_CA.xml -method
sqlimport -commitcount 20
/opt/IBM/WebSphere/CommerceServer70/bin/massload.sh
-dbname WCD1 -dbuser wsppusr -dbpwd wspc0nn3ct -infile
/opt/IBM/WebSphere/CommerceServer70/schema/xml/wcs.bootstrap_multi_en_CA.xml
-method sqlimport -commitcount 20
Creation Files for CMC
Steps for en_CA files:
- SRC
Create
the properties file for en_CA locale.The properties files can be found in WCDE_installdir\workspace\LOBTools\src\com\ibm\commerce\tool\client\lobtools\propertiesdirectory,
where tool is the directory for a Management Center tool. You will be
repeating this step for the following directories:attachement, catalog,
foundations, marketing, promotions, price, catalog filter, store and more (
Refer enGB).Copy all the files in the properties file level that has
"en_GB" embedded in the file name. In each copied file, replace
"en_GB" with "en_CA" in the file name.
- Create a new package for the extension properties files.
Go to : LOBTools\src\com\<company name>\commerce\client\lobtools\properties\
Copy
ShellLOB_en_GB.properties and rename to ShellLOB_en_CA.properties and replace
contents with - languageOptionDisplayText_en_CA=Canadian English
Also
add
languageOptionDisplayText_en_CA=Canadian English to ShellLOB.properties
file.
- Register the new properties in the resource bundle.
Go
to : LOBTools\WebContent\WEB-INF\src\lzx\commerce\shell\
In
the shellResourceBundle_ext.lzx file,
add the following code:
<wcfResourceBundleKey
name="languageOptionDisplayText_en_CA" />
Add
following to UserPreferencePanel.lzx
<wcfPreferenceValue
textKey="${shellResourceBundleExt.languageOptionDisplayText_en_CA}"
value="en_CA" />
Creating SOLR
Files ( http://pic.dhe.ibm.com/infocenter/wchelp/v7r0m0/topic/com.ibm.commerce.developer.doc/tasks/tsdsearchindexnewlang.htm )
Steps for en_CA:
- Perform the following steps for the following files:
WC_installdir/components/foundation/subsomponents/search/solr/home/template/CatalogEntry/conf/locale
WC_installdir/components/foundation/subsomponents/search/solr/home/template/CatalogEntry/unstructured/conf/locale
WC_installdir/components/foundation/subcomponents/search/solr/home/template/CatalogGroup/conf/locale
- Create a new folder for your locale. For example, en_CA indicates a English language locale for Canada.
Copy schema.xml and stopwords.txt
/article.txt from another similar locale
Schema.xml changes:
<filter
class="solr.ElisionFilterFactory"
articles="article.txt"/>
<filter
class="solr.SnowballPorterFilterFactory" language="French"
protected="protwords.txt" />
<filter
class="solr.ElisionFilterFactory"
articles="article.txt"/>
<filter
class="solr.SnowballPorterFilterFactory" language="French"
protected="protwords.txt" />
No comments:
Post a Comment