Publishing the Aurora starter store in the Turkish language

To display 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

  1. 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:

    1. Go to the following directory:
      • AIXWindowsWC_installdir/instances/demo/starterstores/ConsumerDirect/
      • WebSphere Commerce DeveloperWCDE_installdir/starterstores/ConsumerDirect/
    2. Rename the existing Aurora.sar file to Aurora_Backup.sar.
    3. Use an extraction utility to extract the Aurora_Backup.sar file into the ConsumerDirect directory. You must now have a newly extracted folder that is named Aurora_Backup.
      Tip: If your extraction utility does not recognize the Aurora_Backup.sar file as a compressed file, change the file extension from .sar to .zip.
    4. In the Aurora_Backup folder, open the store-data-assets.xml file for editing.

      /Aurora_Backup/WEB-INF/stores/StoreAssetsDir/data/store-data-assets.xml

    5. Enable the following section in the file by deleting the lines at the beginning and end of the section that are labeled 1 and 2:
      <!-- Remove comments if supporting tr_TR 1
        &tr_TR_store.xml;
        &tr_TR_fulfillment.xml;
        &tr_TR_businesspolicy.xml;
        &tr_TR_catalog.xml;
        &tr_TR_accesscontrol.xml;
        &tr_TR_seocatalog.xml;
        &tr_TR_searchterm-mappings.xml;
        &tr_TR_staticmarketingcontent.xml;
        &tr_TR_eSpots.xml; 
      --> 2
    6. Open the ibm-wc-load.xml file at the following path:

      /Aurora_Backup/WEB-INF/stores/StoreAssetsDir/data/ibm-wc-load.xml

    7. Find the dataload task with a LoadOrder parameter (see the code sample in the next step).
    8. In the comma-separated list for the value of the LoadOrder parameter, add the following values to the list:
      • RegWidgetDefDesc_tr_TR
      • SeopageDesc_tr_TR

      As a result, the updated dataload task in the ibm-wc-load.xml file looks similar to this example:

      <task name="dataload">
          <param name="storeId" value="${context:storeEntityId}" />
          <param name="dataLoadConfigFile" value="com.ibm.commerce.pagelayout/dataload/wc-dataload-storepublish.xml" />
          <param name="storePublish" value="true" />
          <param name="LoadOrder" value="Storepltype,RegWidgetDef,RegWidgetDefDesc_de_DE,RegWidgetDefDesc_en_US,RegWidgetDefDesc_es_ES,
          RegWidgetDefDesc_fr_FR,RegWidgetDefDesc_it_IT,RegWidgetDefDesc_ja_JP,RegWidgetDefDesc_ko_KR,RegWidgetDefDesc_pl_PL,
          RegWidgetDefDesc_pt_BR,RegWidgetDefDesc_ro_RO,RegWidgetDefDesc_ru_RU,RegWidgetDefDesc_zh_CN,RegWidgetDefDesc_zh_TW,
          RegWidgetDefDesc_tr_TR,SubscribeWidgetDef,Page,SeopageDesc_en_US,SeopageDesc_de_DE,SeopageDesc_es_ES,
          SeopageDesc_fr_FR,SeopageDesc_it_IT,SeopageDesc_ja_JP,SeopageDesc_ko_KR,SeopageDesc_pl_PL,SeopageDesc_pt_BR,
          SeopageDesc_ro_RO,SeopageDesc_ru_RU,SeopageDesc_zh_CN,SeopageDesc_zh_TW,SeopageDesc_tr_TR,Template,TemplateSlot,
          TemplateWidget,TemplateWidgetNVP,DefaultLayout,DefaultLayoutWidget,DefaultLayoutWidgetNVP,Layout,LayoutWidget,LayoutWidgetNVP" />
          <param name="dataSourceDirectory"   value="${asset:.}" />
      </task>
    9. In the Aurora_Backup folder, compress the entire contents (multiple folders and a file) into a compressed file.
    10. Rename the newly compressed file to Aurora.sar.
    11. Move the newly compressed Aurora.sar file so that it is directly under the ConsumerDirect folder.
      Important: Ensure that the Aurora.sar file is in the exact location of the original and has the identical folder structure. Otherwise, the store publish step at the end of this procedure does not find the edited archive
    12. Delete the extracted Aurora_Backup folder.
  2. 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
    1. Go to the following path:
      • LinuxAIXWindowsWC_installdir\instances\demo\starterstores\ConsumerDirect\
      • WebSphere Commerce DeveloperWCDE_installdir\starterstores\ConsumerDirect\
    2. Rename the existing B2C.sar file to B2C_Backup.sar.
    3. Extract the B2C_Backup.sar file into the ConsumerDirect folder. You must now have a newly extracted folder that is named B2C_Backup.
    4. In the extracted B2C_Backup folder, open the following file for editing:

      /B2C_Backup/WEB-INF/stores/StoreAssetsDir/data/store-data-assets.xml

    5. 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.
    6. In the extracted B2C_Backup folder, compress the contents (3 folders) into a compressed file.
    7. Rename the newly compressed file to B2C.sar.
    8. 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
    9. Delete the extracted B2C_Backup folder.
    B2B.sar
    1. Go to the following path:
      • LinuxAIXWindowsWC_installdir\instances\demo\starterstores\ConsumerDirect\
      • WebSphere Commerce DeveloperWCDE_installdir\starterstores\ConsumerDirect\
    2. Rename the existing B2B.sar file to B2B_Backup.sar.
    3. Extract the B2B_Backup.sar file into the ConsumerDirect folder. You must now have a newly extracted folder that is named B2B_Backup.
    4. In the extracted B2B_Backup folder, open the following file for editing:

      /B2B_Backup/WEB-INF/stores/StoreAssetsDir/data/store-data-assets.xml

    5. 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.
    6. In the extracted B2B_Backup folder, compress the contents (4 folders) into a compressed file.
    7. Rename the newly compressed file to B2B.sar.
    8. 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
    9. Delete the extracted B2B_Backup folder.
    BMP.sar
    1. Go to the following path:
      • LinuxAIXWindowsWC_installdir\instances\demo\starterstores\ConsumerDirect\
      • WebSphere Commerce DeveloperWCDE_installdir\starterstores\ConsumerDirect\
    2. Rename the existing BMP.sar file to BMP_Backup.sar.
    3. Extract the BMP_Backup.sar file into the ConsumerDirect folder. You must now have a newly extracted folder that is named BMP_Backup.
    4. In the extracted BMP_Backup folder, open the following file for editing:

      /BMP_Backup/WEB-INF/stores/StoreAssetsDir/data/store-data-assets.xml

    5. 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.
    6. In the extracted BMP_Backup folder, compress the contents (4 folders) into a compressed file.
    7. Rename the newly compressed file to BMP.sar.
    8. 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
    9. Delete the extracted BMP_Backup folder.
    MPS.sar
    1. Go to the following path:
      • LinuxAIXWindowsWC_installdir\instances\demo\starterstores\ConsumerDirect\
      • WebSphere Commerce DeveloperWCDE_installdir\starterstores\ConsumerDirect\
    2. Rename the existing MPS.sar file to MPS_Backup.sar.
    3. Extract the MPS_Backup.sar file into the ConsumerDirect folder. You must now have a newly extracted folder that is named MPS_Backup.
    4. In the extracted MPS_Backup folder, open the following file for editing:

      /MPS_Backup/WEB-INF/stores/StoreAssetsDir/data/store-data-assets.xml

    5. 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.
    6. In the extracted MPS_Backup folder, compress the contents (3 folders) into a compressed file.
    7. Rename the newly compressed file to MPS.sar.
    8. 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
    9. Delete the extracted MPS_Backup folder.
  3. 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
    1. Go to the following path:
      • LinuxAIXWindowsWC_installdir\instances\demo\starterstores\common\samplecatalogs\
      • WebSphere Commerce DeveloperWCDE_installdir\starterstores\common\samplecatalogs\
    2. Rename the existing B2BSampleData.sar file to B2BSampleData_Backup.sar.
    3. Extract the B2BSampleData_Backup.sar file into the samplecatalogs folder. You must now have a newly extracted folder that is named B2BSampleData_Backup..
    4. In the extracted B2BSampleData_Backup folder, open the following file for editing:

      /B2BSampleData_Backup/WEB-INF/stores/Sample/data/store-data-assets.xml

    5. 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.
    6. In the B2BSampleData_Backup folder, compress the contents (2 folders) into a compressed file.
    7. Rename the newly compressed file to B2BSampleData.sar.
    8. 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
    9. Delete the extracted B2BSampleData_Backup folder.
    BMPSampleData.sar
    1. Go to the following path:
      • LinuxAIXWindowsWC_installdir\instances\demo\starterstores\common\samplecatalogs\
      • WebSphere Commerce DeveloperWCDE_installdir\starterstores\common\samplecatalogs\
    2. Rename the existing BMPSampleData.sar file to BMPSampleData_Backup.sar.
    3. Extract the BMPSampleData_Backup.sar file into the samplecatalogs folder. You must now have a newly extracted folder that is named BMPSampleData_Backup.
    4. In the extracted BMPSampleData_Backup folder, open the following file for editing:

      /BMPSampleData_Backup/WEB-INF/stores/Sample/data/store-data-assets.xml

    5. 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.
    6. In the BMPSampleData_Backup folder, compress the contents (2 folders) into a compressed file.
    7. Rename the newly compressed file to BMPSampleData.sar.
    8. 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
    9. Delete the extracted BMPSampleData_Backup folder.
    CASSampleData.sar
    1. Go to the following path:
      • LinuxAIXWindowsWC_installdir\instances\demo\starterstores\common\samplecatalogs\
      • WebSphere Commerce DeveloperWCDE_installdir\starterstores\common\samplecatalogs\
    2. Rename the existing CASSampleData.sar file to CASSampleData_Backup.sar.
    3. Extract the CASSampleData_Backup.sar file into the samplecatalogs folder. You must now have a newly extracted folder that is named CASSampleData_Backup.
    4. In the extracted CASSampleData_Backup folder, open the following file for editing:

      /CASSampleData_Backup/WEB-INF/stores/CAS/data/store-cas-data.xml

    5. 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.
    6. In the CASSampleData_Backup folder, compress the contents (3 folders) into a compressed file.
    7. Rename the newly compressed file to CASSampleData.sar.
    8. 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
    9. Delete the extracted CASSampleData_Backup folder.
    ESiteSampleData.sar
    1. Go to the following path:
      • LinuxAIXWindowsWC_installdir\instances\demo\starterstores\common\samplecatalogs\
      • WebSphere Commerce DeveloperWCDE_installdir\starterstores\common\samplecatalogs\
    2. Rename the existing ESiteSampleData.sar file to ESiteSampleData_Backup.sar.
    3. Extract the ESiteSampleData_Backup.sar file into the samplecatalogs folder. You must now have a newly extracted folder that is named ESiteSampleData_Backup.
    4. In the extracted ESiteSampleData_Backup.sar folder, open the following file for editing:

      /ESiteSampleData_Backup/WEB-INF/stores/ESite/data/store-data-assets.xml

    5. 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.
    6. In the ESiteSampleData_Backup folder, compress the contents (2 folders) into a compressed file.
    7. Rename the newly compressed file to ESiteSampleData.sar.
    8. 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
    9. Delete the extracted ESiteSampleData_Backup folder.
    SASSampleData.sar
    1. Go to the following path:
      • LinuxAIXWindowsWC_installdir\instances\demo\starterstores\common\samplecatalogs\
      • WebSphere Commerce DeveloperWCDE_installdir\starterstores\common\samplecatalogs\
    2. Rename the existing SASSampleData.sar file to SASSampleData_Backup.sar.
    3. Extract the SASSampleData_Backup.sar file into the samplecatalogs folder. You must now have a newly extracted folder that is named SASSampleData_Backup.
    4. In the extracted SASSampleData_Backup folder, open the following file for editing:

      /SASSampleData_Backup/WEB-INF/stores/SAS/data/store-sas-data.xml

    5. 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.
    6. In the SASSampleData_Backup folder, compress the contents (2 folders) into a compressed file.
    7. Rename the newly compressed file to SASSampleData.sar.
    8. 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
    9. Delete the extracted SASSampleData_Backup folder.
  4. 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.
    1. Open the following file in an editor:
      • LinuxAIXWindowsWC_installdir/schema/xml/wcs.bootstrap_tr_TR_base.xml
      • WebSphere Commerce DeveloperWCDE_installdir/schema/xml/wcs.bootstrap_tr_TR_base.xml
    2. Add the following lines of code to the top of file:
      <language language_id="&tr_TR;" localename="tr_TR" language="tr" country="TR" encoding="UTF-8" mimecharset="iso-8859-9" />
      <langpair storeent_id="-1" language_id="&tr_TR;" language_id_alt="&en_US;" sequence="100" />
    3. Save and close the file.
    4. Open the following file in an editor:
      • LinuxAIXWindowsWC_installdir/schema/xml/wcs.bootstrap_multi_tr_TR_base.xml
      • WebSphere Commerce DeveloperWCDE_installdir/schema/xml/wcs.bootstrap_multi_tr_TR_base.xml
    5. Add the following lines of code to the top of file:
      <languageds language_id="-1" description="Turkish" language_id_desc="-13" />
      <languageds language_id="-13" description="Trkçe" language_id_desc="-13" />
    6. Save and close the file.
  5. Use the massload utility to load the bootstrap files to the WebSphere Commerce database:
    1. Open a command line.
    2. Go to the following directory:
    3. Run the massload utility to load the wcs.bootstrap_tr_TR.xml file by using this command:
      • LinuxAIX./massload.sh -dbname dbname -dbuser dbuser -dbpwd password -infile WC_installdir/schema/xml/wcs.bootstrap_tr_TR.xml -method sqlimport -commitcount 20 -schemaname schemaName
      • Windowsmassload.cmd -dbname dbname -dbuser dbuser -dbpwd password -infile WC_installdir/schema/xml/wcs.bootstrap_tr_TR.xml -method sqlimport -commitcount 20 -schemaname schemaName
      • WebSphere Commerce Developermassload WCDE_installdir/schema/xml/wcs.bootstrap_tr_TR.xml
      For more information about the massload utility, see:
    4. Check the log files for any errors:
      • WC_installdir/logs
      • WCDE_installdir/logs
    5. Open a command line.
    6. Go to the following directory:
    7. Run the massload utility to load the wcs.bootstrap_multi_tr_TR.xml file by using this command:
      • LinuxAIX./massload.sh -dbname dbname -dbuser dbuser -dbpwd password -infile WC_installdir/schema/xml/wcs.bootstrap_multi_tr_TR.xml -method sqlimport -commitcount 20 -schemaname schemaName
      • Windowsmassload.cmd -dbname dbname -dbuser dbuser -dbpwd password -infile WC_installdir/schema/xml/wcs.bootstrap_multi_tr_TR.xml -method sqlimport -commitcount 20 -schemaname schemaName
      • WebSphere Commerce Developermassload WCDE_installdir/schema/xml/wcs.bootstrap_multi_tr_TR.xml
    8. Check the log files for any errors:
      • WC_installdir/logs
      • WCDE_installdir/logs
  6. 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:

    1. Search the file for references to the Instance element.
    2. Within the Instance element, find the attribute BootstrapMulti. A typical entry for the attribute value is wcs.bootstrap_multi_en_US.xml,wcs.bootstrap_multi_fr_FR.xml.
    3. Append the following value to the entry:

      ,wcs.bootstrap_multi_tr_TR.xml

    4. Within the Instance element, find the attribute SupportedLanguages.
    5. Add the value -13 to support the Turkish language.
    6. Save and close the file.
  7. 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, '&#x20BA;', null, '&#x20BA;', null, null, '&#x20BA;', 
    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, '&#x20BA;', null, '&#x20BA;', null, null, '&#x20BA;', 
    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)
  8. Publish the Aurora.sar store archive by using the Administration Console. See Publishing the Aurora starter store.
  9. 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.

  10. In Management Center, add support for the Turkish language and currency for the Aurora store that you published. See Updating store information.
  11. Index the Turkish language in WebSphere Commerce Search.
    1. Go to the following paths:
      • LinuxAIXWindowsWC_installdir/components/foundation/subcomponents/search/solr/home/template/CatalogEntry/conf/locale/tr_TR/

        AIXWindowsWC_installdir/components/foundation/subcomponents/search/solr/home/template/CatalogEntry/unstructured/conf/locale/tr_TR/

      • WebSphere Commerce DeveloperWCDE_installdir/components/foundation/subcomponents/search/solr/home/template/CatalogEntry/conf/locale/tr_TR/

        WebSphere Commerce DeveloperWCDE_installdir/components/foundation/subcomponents/search/solr/home/template/CatalogEntry/unstructured/conf/locale/tr_TR/

    2. Open the schema.xml file and check that the tokenizer and filter factory are suitable for the language.
      For example, ensure that the rules apply for your preferred language, and country or region identifier. If necessary, save your changes and close the file.
    3. Optional: If there are any stop words for the language, create a file that is called stopwords.txt under the new directory for the schema.xml file. Save your changes and close the file.
    4. Index the data. See Preprocessing and building the search index.