Adding translated custom merchandising association types or semantics

You can create custom merchandising association types or semantics, depending on your business needs. For example, may create a custom merchandising association type called replacement. After creating a custom merchandising association type or semantic, you can add national language-translated versions of that type or semantic. These national language-translated types or semantics display in WebSphere Commerce Accelerator. If national language-translated versions are not provided, the value in the database will display.

To add national language-translated versions of your new merchandising association type or semantic:

Procedure

  1. Find the identifier of the custom semantic or type inserted in the database.
    1. Connect to the database
    2. Run one of the following SQL statements:
      1. For custom merchandising association types, run: select MASSOCTYPE_ID from MASSOCTYPE.
      2. For custom merchandising association semantics, run: select MASSOC_ID from MASSOC.
    3. Find your merchandising association type or semantic identifier in the resulting list.
  2. Create a new properties file with the translated information
    1. Navigate to the WC_eardir/xml/tools directory.
    2. Create directories until you have the following directory tree: WC_eardir/xml/tools/custom/properties.
    3. Create a new properties file, for example, myCustomMA_locale.properties, using the locale for which you want to add translated text.
    4. Add the following information to the file:
      # These are translated versions of custom merchandising association identifiers. 
      identifier_found_in_step_1=Translated_text 
      
      for example, if in step 1, you found the identifier for your new type was DOWNSELL, add the following text to your properties file:
      DOWNSELL=translated_text_for_downsell
      
  3. Update the appropriate resources.xml file to include your new properties file:
    1. Navgiate to WC_eardirxml/tools/catalog
    2. Open resources.xml in a text editor.
    3. Edit the file to include the new properties file. Between <resourceBundle name="MAssociationNLS"> and </resourceBundle>, add the following text: <bundle>com.ibm.commerce.tools.custom.properties. yourCustomMA </bundle>. For example, if your properties file is called myCustomMA_fr_FR.properties, your resulting text will be similar to this:
      
      <resourceBundle name="MAssociationNLS">
      <bundle>com.ibm.commerce.tools.catalog.properties.MAssociationNLS</bundle>
      <bundle>com.ibm.commerce.tools.catalog.properties.MAssociationIdentifiersNLS</bundle>
      <bundle>com.ibm.commerce.tools.custom.properties.myCustomMA</bundle>
      </resourceBundle>
      
  4. Restart the WebSphere Commerce within the development environment.
  5. Test that the change displays as expected in the WebSphere Commerce Accelerator. Remember to log in using the correct locale.
  6. If the changes are satisfactory, propagate these changes to the production system:
    1. Update WebSphere Commerce with your new properties file. For more information, see the topic Updating enterprise application files. Ensure that you follow the instructions for updating a single file.

      You will need the following information:

      • Enterprise application name
      • Relative path to file
        xml/tools/custom/properties/new_properties_file
        For example, myCustomMA_locale.properties.
    2. Update WebSphere Commerce with the updated resources.xml file new properties file. For more information, see Updating enterprise application files. Ensure that you follow the instructions for updating a single file.
      You will need the following information:
      Enterprise application name
      WCServer_enterprise_archive
      Relative path to file
      xml/tools/catalog/resources.xml
  7. Restart WebSphere Commerce within the production environment.

Results

If you delete a custom merchandising association semantic or type, you can remove these changes from your system.