Conga Product Documentation

Welcome to the new doc site. Some of your old bookmarks will no longer work. Please use the search bar to find your desired topic.

Show Page Sections

Multi-Language Setup

Multi-language support in E-Commerce enables you to enhance the experience by translating static labels, schema fields, and product catalog data. This setup ensures that your site can effectively communicate with a diverse, global audience

Translating Static Labels or Text

This topic involves translating static labels or text (Page Titles, Header, Footer, Tabs, Descriptions) using local files or the Conga Platform. It includes a table showing translation availability effects and steps for setting locales and updating translations.

File on Local Translation Folder

Translation details on the Conga Platform

Description

Available

Not Available

The application checks the user's locale and translates static labels or text based on the local translation file. Refer to step 2 below.

Not Available

Available

The application checks the user's locale and translates static labels or text based on the translations added to the Conga Platform. Refer to step 3 below.

Available

Available

The application first checks the user's locale and applies Conga Platform translations. If a translation key is missing, it uses the local file. If the key is still not found, it defaults to English.

Not Available

Not Available

If the user's language is not available, the application defaults to English.

  1. Set the user-level locale. For translation, the application uses the user-level locale. You can set the user's locale using the Update a user API.
    Sample request body to set the user's locale to the Spanish (es_ES) language.
    {
      "LocaleName": "es_ES"
    }
    Note:

    To list supported locales, use the following API:

    GET https://<URL_of_the_Instance>/api/user-management/v1/locales
  2. Add local translation file(s):
    1. Go to the assets/i18n folder. The application checks this folder first for translation JSON files.
    2. Copy any sample file from the assets/i18n folder, rename it, and update the translations for your preferred language.
  3. Add translation details on the Conga Platform:
    1. Add a translation module using the Admin User Interface or with Add translation module API.
    2. Update the environment.ts file for translationModule parameter with the module name added in the step 3a.
      Note:

      You must update the translationModule parameter in the environment.ts file while configuring templates. For more information, see Configuring Templates.

    3. Add a translation value for the given locale and module using the Admin User Interface or Add translation value API.
      Tip:

      You must use the CustomLabels in the parameter as a key and the stringified value of your translation JSON file as a value.

      For example:

      {
        "Key": "<LABEL_KEY>",
        "Value": "<Label Value>"
      }
      
      Refer to the example below for French translation:
      {
        "Key": "COMMON.ORDER_TOTAL",
        "Value": "Montant total commandé"
      }


Setting up Schema or Field Label

You are configuring schema or field labels for multi-language support, enabling users to interact with the system in their preferred language. This involves using APIs to define translations, enhancing user experience and accessibility globally.
  1. Define field label translation for the given object using Define the translation API.
    Note:

    You can also use other CRUD operations for field label translation using Object Definition Translation APIs.

  2. Refer the following example steps to translate the Phone Number field label on the Account object into the Spanish language and locale (es_ES):
    1. Go to theDefine the translation API.
    2. Enter Account in the objectName parameter.
    3. Enter es_ES in the locale parameter.
      Note:

      To list supported locales, use the following API:

      GET https://<URL_of_the_Instance>/api/user-management/v1/locales
    4. Use the following sample request body:
      {
        "ObjectName": "Account",
        "MetadataTranslations": [
          {
            "Scope": "Field",
            "Name": "Phone Number",
            "DisplayName": "Nombre de usuario",
            "Description": "English to Spanish translation for Phone Number field."
          }
        ]
      }


  3. Refer the following example steps to translate the Email and Shipping Address field label on the Account object into the Italian language and Swiss locale (it_CH):
    1. Go to theDefine the translation API.
    2. Enter Account in the objectName parameter.
    3. Enter it_CH in the locale parameter.
      Note:

      To list supported locales, go to the Get all locales API.

    4. Use the following sample request body:
      {
        "ObjectName": "Account",
        "MetadataTranslations": [
          {
            "Scope": "Field",
            "Name": "Shipping Address",
            "DisplayName": "Indirizzo di spedizione",
            "Description": "English to Italian translation for Shipping Address field."
          }
        ]
      }

Setting up Data Translation on Product Catalog

Data translation localizes such elements as product names, categories, and error messages from the Catalog API. Translation data is configured and verified across Product, Category, Attribute, Attribute Group, Option, and Option Group modules within the product catalog. Use the following steps and APIs to translate data.
  1. Set the user locale from from the Admin UI, see Locale Setup topic or by using the Update a User API.
  2. To set the user's locale for Chinese language via Admin UI, follow the steps:
    1. Click the desired active user name link from the User List page, or click the More () icon at the start of the user record.
    2. Click Edit to update the locale.
    3. Search Chinese and select it for the locale.
    4. Click Save to set locale as Chinese.
  3. To set the user's locale via API for Chinese language "zh-Hans-MO", follow the steps below:
    1. Go to the Update a User API.
    2. Enter the userId parameter.
    3. Use the following sample request body to update the locale name:
      {
        "LocaleName": "zh-Hans-MO"
      }