Publishing the Aurora starter store in the Arabic language

To display the Aurora starter store in the Arabic language, you must modify certain files in the store archives and then publish the store. You must also add the Arabic language to WebSphere Commerce and index the new language.

Procedure

  1. Edit the Aurora.sar store archive to publish the Arabic language data.

    The Aurora.sar is fully translated into Arabic. 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:
      • LinuxAIXWindowsWC_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 following 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 ar_EG 1
        &ar_EG_store.xml;
        &ar_EG_fulfillment.xml;
        &ar_EG_businesspolicy.xml;
        &ar_EG_catalog.xml;
        &ar_EG_accesscontrol.xml;
        &ar_EG_seocatalog.xml;
        &ar_EG_searchterm-mappings.xml;	
        &ar_EG_staticmarketingcontent.xml;
        &ar_EG_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_ar_EG
      • SeopageDesc_ar_EG

      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_ar_EG,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_ar_EG,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 publishes 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 Arabic. However, the data is not automatically loaded to the database with the other 13 supported languages unless you enable the sections specific to the Arabic 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 Arabic 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 Arabic language data

    Archive Steps to enable the Arabic 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 Arabic language data in the file by deleting the comments at the beginning and end of the section for ar_EG 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 Arabic language data in the file by deleting the comments at the beginning and end of the section for ar_EG 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 Arabic language data in the file by deleting the comments at the beginning and end of the section for ar_EG 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 Arabic language data in the file by deleting the comments at the beginning and end of the section for ar_EG 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 Arabic language in the sample data store archives. Otherwise, skip to step 4.

    Sample data stores archives to enable Arabic language data

    Archive Steps to enable the Arabic 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 Arabic language data in the file by deleting the comments at the beginning and end of the section for ar_EG 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 Arabic language data in the file by deleting the comments at the beginning and end of the section for ar_EG 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 Arabic language data in the file by deleting the comments at the beginning and end of the section for ar_EG 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 folder, open the following file for editing:

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

    5. Enable the Arabic language data in the file by deleting the comments at the beginning and end of the section for ar_EG 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 Arabic language data in the file by deleting the comments at the beginning and end of the section for ar_EG 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. Publish the Aurora.sar store archive by using the Administration Console. See Publishing the Aurora starter store.
  5. Optional: Update the price mode to computed price mode (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 Arabic, the store page displays Price pending instead of the price of a product because the index does not contain prices in the new currency.

    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.

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

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

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

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

    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.