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

Translations Setup using Salesforce

The Storefront record must include the translation URL. On the Storefront record, set Translation URL = /apex/APTS_EcommerceTranslation. This URL points to a static page that contains all translations. See the example code snippet.

<apex:page contentType="application/json; charset=utf-8" language="{!$CurrentPage.parameters.language}">

{
  "ERROR": {
    "MIN-OPTIONS": "{!$Label.eCom_MIN_OPTIONS}",
    "CART": {
      "TOO_MANY_ATTEMPTS": "{!$Label.ecom_TOO_MANY_ATTEMPTS}",
      "PRICE_CHANGE": "{!$Label.eCom_PRICE_CHANGE}",
      "PRICE_CHANGE_TOASTR_TITLE": "{!$Label.eCom_PRICE_CHANGE_TOASTR_TITLE}"
    },
    "APPLICATION_ERROR_TOASTR_TITLE": "{!$Label.eCom_APPLICATION_ERROR_TOASTR_TITLE}"
  },
  "SUCCESS": {
    "CART": {
      "ITEM_ADDED_TOASTR_MESSAGE": "{!$Label.eCom_ITEM_ADDED_TOASTR_MESSAGE}",
      "ITEM_ADDED_TOASTR_TITLE": "{!$Label.eCom_ITEM_ADDED_TOASTR_TITLE}"
    }
  },
  "ASSETS": {
    "CHANGECONFIGURATION_SUCCESS": "{!$Label.eCom_Assets_ChangeConfigurationSuccess}",
    "CHANGECONFIGURATION_START_DATE": "{!$Label.eCom_Assets_ChangeConfigurationStartDate}",
    "CHANGECONFIGURATION_END_DATE": "{!$Label.eCom_Assets_ChangeConfigurationEndDate}"
  },
  "MY_ACCOUNT": {
    "LAST_LOGIN_DATE": "{!$Label.eCom_LAST_LOGIN_DATE}"
  },
  "BUTTON": {
    "Change Configuration": "{!$Label.eCom_Button_ChangeConfiguration}"
  },
  "PRODUCT_CARD": {
    "INSTALLED_PRODUCT": "{!$Label.eCom_PRODUCT_CARD_INSTALLED_PRODUCT}",
    "STANDARD_PRICE": "{!$Label.eCom_PRODUCT_CARD_STANDARD_PRICE}"
  },
  "PAGINATION": {
    "FIRST": "{!$Label.eCom_PAGINATION_FIRST}"
  },
  "COMMON": {
    "ORDERS": "{!$Label.eCom_COMMON_ORDERS}",
    "USERNAME": "{!$Label.eCom_COMMON_USERNAME}",
    "QUANTITY": "{!$Label.eCom_COMMON_QUANTITY}",
    "CHANGE_CONFIGURATION": "{!$Label.eCom_Common_ChangeConfiguration}",
    "ADD_TO_CART": "{!$Label.eCom_Add_to_Cart}"
  },
  "CONSTRAINT_POPOVER": {
    "PRODUCTS_INCLUDED_EXCLUDED_HEADING": "{!$Label.eCom_PRODUCTS_INCLUDED_EXCLUDED_HEADING}"
  },
  "CART": {
    "PAYMENT": {
      "PAYMENT_TITLE": "{!$Label.eCom_CART_PAYMENT_TITLE}"
    },
    "CART_SUMMARY": {
      "QUANTITY": "{!$Label.eCom_CART_SUMMARY_QUANTITY}"
    },
    "CHECKOUT": "{!$Label.eCom_CHECKOUT}",
    "BILLING_AND_SHIPPING_INFORMATION": "{!$Label.eCom_BILLING_AND_SHIPPING_INFORMATION}"
  },
  "MANAGE_CART": {
    "CART_SUMMARY": {
      "CART_SUMMARY_TITLE": "{!$Label.eCom_Cart_Summary_Title}",
      "SUB_TOTAL": "{!$Label.eCom_Sub_Total}"
    },
    "CART_TABLE": {
      "ITEMS_IN_YOURCART": "{!$Label.eCom_ITEMS_IN_YOUR_CART}"
    }
  },
  "FOOTER": {
    "PRODUCTS": "{!$Label.eCom_FOOTER_PRODUCTS}"
  },
  "HEADER": {
    "SUBMIT": "{!$Label.eCom_HEADER_SUBMIT}",
    "ENTER_YOUR_SEARCH_TERM": "{!$Label.eCom_ENTER_YOUR_SEARCH_TERM}",
    "LAST_LOGIN": "{!$Label.eCom_HEADER_LAST_LOGIN}",
    "HOME": "{!$Label.eCom_HEADER_HOME}",
    "LOG_OUT": "{!$Label.eCom_HEADER_LOG_OUT}",
    "LOG_IN": "{!$Label.eCom_HEADER_LOG_IN}"
  },
  "PROMOTION": {
    "PROMO_CODE": "{!$Label.eCom_PROMOTION_PROMO_CODE}",
    "PROMOTION_APPLIED": "{!$Label.eCom_PROMOTION_APPLIED}",
    "APPLIED_PROMOTION": "{!$Label.eCom_APPLIED_PROMOTION}"
  },
  "LOGIN": {
    "USERNAME": "{!$Label.eCom_LOGIN_USERNAME}",
    "SIGN_IN": "{!$Label.eCom_LOGIN_SIGN_IN}",
    "INCORRECT_CREDENTIALS_TOASTR_MESSAGE": "{!$Label.eCom_INCORRECT_CREDENTIALS_TOASTR_MESSAGE}"
  },
  "PRODUCT_DETAILS": {
    "PRODUCT_DETAIL": "{!$Label.eCom_PRODUCT_DETAIL}",
    "PRODUCT_CODE": "{!$Label.eCom_PRODUCT_CODE}",
    "STANDARD_PRICE": "{!$Label.eCom_PRODUCT_DETAILS_STANDARD_PRICE}",
    "UPDATE_CONFIGURATION": "{!$Label.eCom_PRODUCT_DETAILS_UPDATE_CONFIGURATION}"
  },
  "INSTALLED_PRODUCTS": {
    "PRODUCT_FAMILY": "{!$Label.eCom_INSTALLED_PRODUCTS_PRODUCT_FAMILY}"
  },
  "MINI_CART": {
    "YOUR_CART_IS_EMPTY": "{!$Label.eCom_MINI_CART_YOUR_CART_IS_EMPTY}"
  }
}
</apex:page>


Wherever you are displaying a label on the UI, a translation pipe is used.



This translation pipe calls the translation loader service, which uses the translation get method to look for the translation URL whether it is in the code base or defined on the storefront object. The translation get method looks at the URL, reads the file, gets all the key values, and displays the response on the template.

Defining Translations using Custom Labels

You define translations in Salesforce using custom labels to support the translation URL on the Storefront record. This task helps you create custom labels, enter default values and categories, and prepare them for translation into any Salesforce-supported language.
  1. Go to Setup > App Setup > Create and click Custom Labels.
  2. Click New Custom Label.
  3. Enter a Short Description for the custom label you are creating.
  4. Enter a Name for the custom label.
  5. The default language is English.
  6. In Categories, enter text to categorize the label.
  7. In the Value text box, enter text. This value can be translated into any language that Salesforce supports.
  8. Click Save.

Translations for Custom Labels

You translate custom labels to control the text displayed for users in different languages. This task helps you add or edit translations so that when a user's default language matches a translation, Salesforce displays the translated text instead of the default label value.

  1. Go to Setup > App Setup > Create and click Custom Labels.
  2. Select the name of the custom label to open.
  3. In the Translations related list, click New to enter a new translation or Edit next to the language to change a translation.
  4. Select the Language you are translating into.
  5. Enter the Translation Text. This text overrides the value specified in the label's Value field when a user's default language is the translation language.
  6. Click Save.

Define Translations for Custom Objects

Salesforce supports Product Translations, Category Translations, and Attribute Group Translations.

Defining Translations for Products

You can define translations for products to display localized product information in your storefront. This task helps you enter translated text for product fields such as name, description, language, and product code so users see product details in their preferred language.
  1. Go to the Product Translations tab and click New. - OR - Go to the Product tab, select a product for which you want to define translation, and from the Product Translations related list, click New Product Translations.
  2. Enter a Translation Name.
  3. Enter translated text for the following fields:
    • Description
    • Language
    • Name
    • Product
    • ProductCode
      Note:

      Currently, Family is not supported.



Now when you browse a product on the cart for which you have defined translations in Salesforce, the translated text is displayed.



Note:

For illustration purposes, the translated categories are prefixed with es_ in the above image. In the actual scenario, the correct language is displayed.

Similarly, you can define category translations.

Defining Translations for Categories

You can define translations for categories to display localized category names in your storefront. This task helps you create category translations by specifying the language, label, and currency so users see category information in their preferred language.
  1. Go to the Product tab, select a product for which you want to define the category translation.
  2. Go to the Categories related list and click the category classification Id.
  3. From the Product Classification page, click the Category or Go to the Categories tab and select the Category for which you want to define translations.
  4. From the Category Translations related list, click New Category Translation.
  5. Enter a Category Translation Name.
  6. Search and select the Category Hierarchy.
  7. Enter a Language and a Label.
  8. Select a currency.
  9. Click Save.

Defining Translations for Product Attribute Group

You can define translations for product attribute groups to display localized attribute group names in your storefront. This task helps you create translations by specifying the translated name, language, and currency so users see attribute groups in their preferred language.
  1. Go to the Product Attribute Groups tab and select a product attribute group for which you want to define the attribute group translation.
  2. Go to the Attribute Group Translations related list and click New Attribute Group Translation.
  3. Enter a Translation Name.
  4. The Product Attribute Group field is already populated.
  5. In Name, enter the translated attribute group name.
  6. Enter a Language.
  7. Select a currency.
  8. Click Save.