Publishing the Aurora starter store in the Turkish language
tr_TR
locale), you must modify certain
files in the store archives and then publish the store. You must also
add the Turkish language to WebSphere Commerce and index the new language.Procedure
- Edit the Aurora.sar store archive
to publish the Turkish language data.
The Aurora.sar is fully translated into Turkish. However, the data is not automatically loaded to the database with the other supported languages unless you complete these steps:
- Edit the store archives that contain additional assets
that are required for the Aurora starter store.
These store archives are fully translated into Turkish. However, the data is not automatically loaded to the database with the other 13 supported languages unless you enable the sections specific to the Turkish locale.
In this step, you change four store archives by doing the following things:- Extracting the store archive.
- Editing a file in the extracted archive to enable the Turkish language.
- Compressing the extracted archive so that it has the identical name and folder structure that
the original store archive had. Important: Ensure that the edited archive has the identical name and folder structure as the original or the store publish step at the end of this procedure does not find the edited archive.
Store archives to enable Turkish language data
Archive Steps to enable the Turkish language B2C.sar - Go to the following path:
- WC_installdir\instances\demo\starterstores\ConsumerDirect\
- WCDE_installdir\starterstores\ConsumerDirect\
- Rename the existing B2C.sar file to B2C_Backup.sar.
- Extract the B2C_Backup.sar file into the ConsumerDirect folder. You must now have a newly extracted folder that is named B2C_Backup.
- In the extracted B2C_Backup folder, open
the following file for editing:
/B2C_Backup/WEB-INF/stores/StoreAssetsDir/data/store-data-assets.xml
- Enable the Turkish language data in the file by deleting the comments
at the beginning and end of the section for
tr_TR
data. Save and close the file. - In the extracted B2C_Backup folder, compress the contents (3 folders) into a compressed file.
- Rename the newly compressed file to B2C.sar.
- Move the newly compressed B2C.sar file so that it is directly under the ConsumerDirect folder. Ensure that this B2C.sar file is now in the exact location of the original and has the identical folder structure
- Delete the extracted B2C_Backup folder.
B2B.sar - Go to the following path:
- WC_installdir\instances\demo\starterstores\ConsumerDirect\
- WCDE_installdir\starterstores\ConsumerDirect\
- Rename the existing B2B.sar file to B2B_Backup.sar.
- Extract the B2B_Backup.sar file into the ConsumerDirect folder. You must now have a newly extracted folder that is named B2B_Backup.
- In the extracted B2B_Backup folder, open
the following file for editing:
/B2B_Backup/WEB-INF/stores/StoreAssetsDir/data/store-data-assets.xml
- Enable the Turkish language data in the file by deleting the comments
at the beginning and end of the section for
tr_TR
data. Save and close the file. - In the extracted B2B_Backup folder, compress the contents (4 folders) into a compressed file.
- Rename the newly compressed file to B2B.sar.
- Move the newly compressed B2B.sar file so that it is directly under the ConsumerDirect folder. Ensure that this B2B.sar file is now in the exact location of the original and has the identical folder structure
- Delete the extracted B2B_Backup folder.
BMP.sar - Go to the following path:
- WC_installdir\instances\demo\starterstores\ConsumerDirect\
- WCDE_installdir\starterstores\ConsumerDirect\
- Rename the existing BMP.sar file to BMP_Backup.sar.
- Extract the BMP_Backup.sar file into the ConsumerDirect folder. You must now have a newly extracted folder that is named BMP_Backup.
- In the extracted BMP_Backup folder, open
the following file for editing:
/BMP_Backup/WEB-INF/stores/StoreAssetsDir/data/store-data-assets.xml
- Enable the Turkish language data in the file by deleting the comments
at the beginning and end of the section for
tr_TR
data. Save and close the file. - In the extracted BMP_Backup folder, compress the contents (4 folders) into a compressed file.
- Rename the newly compressed file to BMP.sar.
- Move the newly compressed BMP.sar file so that it is directly under the ConsumerDirect folder. Ensure that this BMP.sar file is now in the exact location of the original and has the identical folder structure
- Delete the extracted BMP_Backup folder.
MPS.sar - Go to the following path:
- WC_installdir\instances\demo\starterstores\ConsumerDirect\
- WCDE_installdir\starterstores\ConsumerDirect\
- Rename the existing MPS.sar file to MPS_Backup.sar.
- Extract the MPS_Backup.sar file into the ConsumerDirect folder. You must now have a newly extracted folder that is named MPS_Backup.
- In the extracted MPS_Backup folder, open
the following file for editing:
/MPS_Backup/WEB-INF/stores/StoreAssetsDir/data/store-data-assets.xml
- Enable the Turkish language data in the file by deleting the comments
at the beginning and end of the section for
tr_TR
data. Save and close the file. - In the extracted MPS_Backup folder, compress the contents (3 folders) into a compressed file.
- Rename the newly compressed file to MPS.sar.
- Move the newly compressed MPS.sar file so that it is directly under the ConsumerDirect folder. Ensure that this MPS.sar file is now in the exact location of the original and has the identical folder structure
- Delete the extracted MPS_Backup folder.
- If you want to publish sample data in your
store, complete the following steps to enable the Turkish language
in the sample data store archives. Otherwise, skip to step 4.
Sample data archives to enable Turkish language data
Archive Steps to enable the Turkish language B2BSampleData.sar - Go to the following path:
- WC_installdir\instances\demo\starterstores\common\samplecatalogs\
- WCDE_installdir\starterstores\common\samplecatalogs\
- Rename the existing B2BSampleData.sar file to B2BSampleData_Backup.sar.
- Extract the B2BSampleData_Backup.sar file into the samplecatalogs folder. You must now have a newly extracted folder that is named B2BSampleData_Backup..
- In the extracted B2BSampleData_Backup folder,
open the following file for editing:
/B2BSampleData_Backup/WEB-INF/stores/Sample/data/store-data-assets.xml
- Enable the Turkish language data in the file by deleting the comments
at the beginning and end of the section for
tr_TR
data. Save and close the file. - In the B2BSampleData_Backup folder, compress the contents (2 folders) into a compressed file.
- Rename the newly compressed file to B2BSampleData.sar.
- Move the newly compressed B2BSampleData.sar file so that it is directly under the samplecatalogs folder. Ensure that this B2BSampleData.sar file is now in the exact location of the original and has the identical folder structure
- Delete the extracted B2BSampleData_Backup folder.
BMPSampleData.sar - Go to the following path:
- WC_installdir\instances\demo\starterstores\common\samplecatalogs\
- WCDE_installdir\starterstores\common\samplecatalogs\
- Rename the existing BMPSampleData.sar file to BMPSampleData_Backup.sar.
- Extract the BMPSampleData_Backup.sar file into the samplecatalogs folder. You must now have a newly extracted folder that is named BMPSampleData_Backup.
- In the extracted BMPSampleData_Backup folder,
open the following file for editing:
/BMPSampleData_Backup/WEB-INF/stores/Sample/data/store-data-assets.xml
- Enable the Turkish language data in the file by deleting the comments
at the beginning and end of the section for
tr_TR
data. Save and close the file. - In the BMPSampleData_Backup folder, compress the contents (2 folders) into a compressed file.
- Rename the newly compressed file to BMPSampleData.sar.
- Move the newly compressed BMPSampleData.sar file so that it is directly under the samplecatalogs folder. Ensure that this BMPSampleData.sar file is now in the exact location of the original and has the identical folder structure
- Delete the extracted BMPSampleData_Backup folder.
CASSampleData.sar - Go to the following path:
- WC_installdir\instances\demo\starterstores\common\samplecatalogs\
- WCDE_installdir\starterstores\common\samplecatalogs\
- Rename the existing CASSampleData.sar file to CASSampleData_Backup.sar.
- Extract the CASSampleData_Backup.sar file into the samplecatalogs folder. You must now have a newly extracted folder that is named CASSampleData_Backup.
- In the extracted CASSampleData_Backup folder,
open the following file for editing:
/CASSampleData_Backup/WEB-INF/stores/CAS/data/store-cas-data.xml
- Enable the Turkish language data in the file by deleting the comments
at the beginning and end of the section for
tr_TR
data. Save and close the file. - In the CASSampleData_Backup folder, compress the contents (3 folders) into a compressed file.
- Rename the newly compressed file to CASSampleData.sar.
- Move the newly compressed CASSampleData.sar file so that it is directly under the samplecatalogs folder. Ensure that this CASSampleData.sar file is now in the exact location of the original and has the identical folder structure
- Delete the extracted CASSampleData_Backup folder.
ESiteSampleData.sar - Go to the following path:
- WC_installdir\instances\demo\starterstores\common\samplecatalogs\
- WCDE_installdir\starterstores\common\samplecatalogs\
- Rename the existing ESiteSampleData.sar file to ESiteSampleData_Backup.sar.
- Extract the ESiteSampleData_Backup.sar file into the samplecatalogs folder. You must now have a newly extracted folder that is named ESiteSampleData_Backup.
- In the extracted ESiteSampleData_Backup.sar folder,
open the following file for editing:
/ESiteSampleData_Backup/WEB-INF/stores/ESite/data/store-data-assets.xml
- Enable the Turkish language data in the file by deleting the comments
at the beginning and end of the section for
tr_TR
data. Save and close the file. - In the ESiteSampleData_Backup folder, compress the contents (2 folders) into a compressed file.
- Rename the newly compressed file to ESiteSampleData.sar.
- Move the newly compressed ESiteSampleData.sar file so that it is directly under the samplecatalogs folder. Ensure that this ESiteSampleData.sar file is now in the exact location of the original and has the identical folder structure
- Delete the extracted ESiteSampleData_Backup folder.
SASSampleData.sar - Go to the following path:
- WC_installdir\instances\demo\starterstores\common\samplecatalogs\
- WCDE_installdir\starterstores\common\samplecatalogs\
- Rename the existing SASSampleData.sar file to SASSampleData_Backup.sar.
- Extract the SASSampleData_Backup.sar file into the samplecatalogs folder. You must now have a newly extracted folder that is named SASSampleData_Backup.
- In the extracted SASSampleData_Backup folder,
open the following file for editing:
/SASSampleData_Backup/WEB-INF/stores/SAS/data/store-sas-data.xml
- Enable the Turkish language data in the file by deleting the comments
at the beginning and end of the section for
tr_TR
data. Save and close the file. - In the SASSampleData_Backup folder, compress the contents (2 folders) into a compressed file.
- Rename the newly compressed file to SASSampleData.sar.
- Move the newly compressed SASSampleData.sar file so that it is directly under the samplecatalogs folder. Ensure that this SASSampleData.sar file is now in the exact location of the original and has the identical folder structure
- Delete the extracted SASSampleData_Backup folder.
- Go to the following path:
- Configure the bootstrap files that are required
to support the Turkish language. Bootstrap files are XML files that are used to populate database tables with information, after the schema is created. You must update several bootstrap files to add the Turkish language support.
- Use the
massload
utility to load the bootstrap files to the WebSphere Commerce database: - Update the WebSphere Commerce configuration file to support
the Turkish language.
To ensure that you are using the correct process for locating, updating, and then deploying the WebSphere Commerce configuration file, follow the instructions in Updating the WebSphere Commerce configuration file.
Make the following updates to the WebSphere Commerce configuration file for the Turkish language:
- Add the Turkish Lira currency to WebSphere Commerce.
Follow the steps in Adding a currency to WebSphere Commerce. You can use the following SQL statements to load the Turkish Lira currency:
insert into setcurr (setccurr, setccode, setcexp) values ('TRY', 949, -2)
insert into setcurrdsc (setccurr, language_id, description) values ('TRY', -1, 'Turkish Lira')
insert into setcurrdsc (setccurr, language_id, description) values ('TRY', -13, 'Trkçe')
insert into curformat (storeent_id, setccurr, roundingmultiple, numbrusg_id, roundingmethod, decimalplaces, minapproveamount) values (-1, 'TRY', 1, -1, 'R', 2, null)
insert into curfmtdesc (storeent_id, setccurr, language_id, currencysymbol, customizedcurrstr, currencyprefixpos, currencysuffixpos, displaylocale, currencyprefixneg, currencysuffixneg, radixpoint, groupingchar, numberpattern, description) values (-1, 'TRY', -1, '₺', null, '₺', null, null, '₺', null, null, null, '#,##0.00', 'Turkish Lira')
insert into curfmtdesc (storeent_id, setccurr, language_id, currencysymbol, customizedcurrstr, currencyprefixpos, currencysuffixpos, displaylocale, currencyprefixneg, currencysuffixneg, radixpoint, groupingchar, numberpattern, description) values (-1, 'TRY', -13, '₺', null, '₺', null, null, '₺', null, null, null, '#,##0.00', 'Trk Liras')
Important: The following SQL statement is an example of how you might calculate the exchange rate. Ensure that your statement contains the correct values to calculate the current exchange rate.insert into curconvert (storeent_id, fromcurr, tocurr, factor, multiplyordivide, bidirectional, updatable, curconvert_id) values (-1,'USD','TRY','1.93','M','Y','Y',-101)
- Publish the
Aurora.sar
store archive by using the Administration Console. See Publishing the Aurora starter store. - Optional: Update the price mode to the computed
price mode (value is 0).
By default, the Aurora starter store uses the indexed price mode instead of the computed price mode. In the indexed price mode, the store loads all prices into the WebSphere Commerce Search (Solr) index and displays prices directly from the index. In the default index, all product prices for the Aurora sample data are in USD currency only. Therefore, when you switch to a different currency, such as Turkish, the store page displays
Price pending
instead of the price of a product because the index does not contain prices in those currencies.If you want to display prices for currencies other than USD by using currency conversion rates, you must switch to computed price mode. You can switch price modes by running the following SQL statement to update the price mode in the STORECONF table:
UPDATE STORECONF SET VALUE='0' WHERE STOREENT_ID=TargetStoreId AND NAME='wc.search.priceMode'
Where
TargetStoreId
is the store ID of the store for which you are changing the price mode, for example,10001
.For detailed instructions, see Changing search configuration properties in the STORECONF table.
Another way to display prices in a particular currency is to enter prices for all products in that currency. For performance reasons, consider entering product prices in each supported currency in the index rather than relying on currency conversion.
- In Management Center, add support for the Turkish language and currency for the Aurora store that you published. See Updating store information.
- Index the Turkish language in WebSphere Commerce Search.