Top
Batch translation
  • 24 Sep 2025
  • 4 Minutes To Read
  • Dark
    Light
  • PDF

Batch translation

  • Dark
    Light
  • PDF

Article summary

Batch translation is a process that uploads content for translation using a method called polling, while checking for status periodically. It uses a cloud storage (for example, Azure bucket) to retrieve translated content. The address or location of this translated content in the bucket is then provided to the custom translation tool to send the translated files back to Whatfix.

Note:

The integration setup for the following steps uses Microsoft Azure as an example. Based on your requirements and the tool of your choice, setup the integration accordingly.

Expand the following accordions to integrate a translation tool using the batch translation method:

Step 1: Add Translation Tool for batch translation

Use the following steps to add a translation tool for batch translation:

  1. On the Whatfix Guidance dashboard, click Settings.
    ia_settings_without_auto_testing

  1. Click Translation tools.

  2. In the Translation tools page, click the Add icon.  

  3. In the Integrating with Custom tool dialog box, enter the name of the tool, and then select Batch as the translation method.

  4. Click Continue. You are redirected to the Setup section.

Step 2: Map Languages for batch translation

Translation tools use codes to distinguish languages and translate content. In the Map Languages section, configure language codes to set the Primary language and the Language code. You must map the language code used in the translation tool with the language supported by Whatfix. For example, Fr: fr (French) and De: de (German).


After you have added a translation tool, use the following steps to add languages and map them between Whatfix and the custom translation tool:

  1. In the Map Languages section, enter the Language code for the Whatfix primary language as recognized by your custom translation tool.  


  2. To map other languages, click + Add language code.


  3. Select the input language and enter the Language code.  

Step 3: Upload translations to Custom tool

Whatfix content must be converted into a format so that the translation tool can receive and interpret the data. This includes to and from language, translation attributes, and other details to uniquely identify the content and the fields in the content that require translation.

Use the following steps to upload Whatfix data to a format accepted by the custom tool:

  1. In the Convert Whatfix data to format accepted by the Custom tool section, enter a Description (Optional). By default, the Configuration type is set to Javascript.

  2. In the Script field, enter the Javascript code to convert Whatfix data into a format accepted by the custom translation tool.

    Here’s an example Javascript code for Microsoft Azure:

    function convertToMicrosoftTranslationInput(original_data) {
            var inputForMs = [];
            for (var i = 0; i < original_data.length; i++) {
                var item = original_data[i];
                inputForMs.push({
                    "Text": item.value
                });
            }
            return inputForMs;
        }
    var microsoftTranslationInput = convertToMicrosoftTranslationInput(attributes.translationStrings);
    var targetFileName = attributes.entId+":"+Date.now();
    attributes.global_data = targetFileName;
    output.data = microsoftTranslationInput;

Note:

The JS Script code editor only supports versions earlier than ES6. For more information about specifying variables and parameters, see Translation Tool Guidelines.

  1. In the Configure Custom tool section, enter the logic to process the translation request for the custom translation tool. This section acts as an interface where you can write the necessary logic for data preparation.

    Note:

    The following configuration examples display the details to configure the custom tool when you upload the Whatfix content for translation. Based on the example shown, enter the following details for your custom translation tool accordingly.

    Configuration 1:


    Configuration 2:

Step 4: Download translations from Custom tool

After you have uploaded Whatfix content for translation to the translation tool, it must be downloaded from the tool, and then converted into a format so that Whatfix can receive and interpret the data. Whatfix continuously polls the custom tool for status updates and retrieves the translated data once processing is complete.

Use the following steps to download the Custom tool data to a format accepted by Whatfix:

  1. In the Configure Custom tool section, enter the logic to download the translation request from the custom translation tool.

    Note:

    The following images display an example setup to configure the custom tool when you download the Whatfix content after translation. Based on the example shown, enter the following details for your custom translation tool accordingly:

    Configuration 1:


    Configuration 2:


    Configuration 3:

  2. In the Convert format from custom tool to Whatfix data section, enter a Description (Optional) and specify the details to convert data from translation tool to a format accepted by Whatfix.


    Note:

    The following is an example code to convert Custom tool data to a format accepted by Whatfix:

    function mergeTranslatedValues(original_data, translated_data) {
            var result = [];
            for (var i = 0; i < original_data.length; i++) {
                var originalItem = original_data[i];
                var translatedItem = translated_data[i];
                result.push({
                    key: originalItem.key,
                    value: translatedItem.translations[0].text
                });
            }
            return result;
        }
    var mergedData = mergeTranslatedValues(attributes.translationStrings, input);
    output.data = mergedData;
    


  3. Once you have filled out all the necessary details on the Translation Tools page, click Save.

To complete the integration process, activate the custom integration tool in the Translation tools page.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.