DeepL

Automatically translate content for different language templates using the DeepL addOn.

The DeepL AddOn is only available for Superpowers and Enterprise plans. Superpowers customers can add up to 6 translations per template. If you're on an Enterprise plan, you can add up to 20 translations.

MLT Automatic Bulk Translation with DeepL

The new DeepL addOn available in the Developer Console empowers your end users to translate all the translatable content within their designs using the new translate button. This feature requires that you have Multi-language templates configured for your application, and that you have a DeepL API key. Once you configure both within your host application, your end users will be able to automatically translate the translatable content within the additional language versions of their designs. If you are on the Superpowers plan, your end users can add up to 6 additional translations, and for Enterprise, your end users can add up to 20 additional translations. Visit the Automatic Translations white label end user documentation to learn more about how this feature works for your application's end users.

The following content types qualify as translatable content:

Modules and translatable properties
Header Meta information
  • Button: label - The text displayed on the button.

  • Paragraph: html - The HTML content of the paragraph.

  • Heading/Title: text - The textual content of the heading or title.

  • List: html - The HTML content of the list.

  • Image: alt - The alternative text for the image.

  • Video: thumbAlt - The alternative text for the video's thumbnail.

  • Icon: text, alt, title - The textual content, alternative text, and title of the icon.

  • Menu: text, title - The textual content and title of the menu.

  • Title

  • Description

  • Subject

  • Preheader

The HTML translatable property refers to the text within the HTML tags of the element itself. For the "Button" module, the translatable property is "label," which specifies the text displayed on the button. In the "Paragraph" module, the translatable property is "html," indicating the HTML content within the paragraph tags. For "Heading/Title," the property is "text," representing the textual content of the heading or title. The "List" module also uses "html," referring to the HTML content within the list tags. The "Image" module has the "alt" property, which provides alternative text for the image. In the "Video" module, "thumbAlt" denotes the alternative text for the video's thumbnail. The "Icon" module includes "text," "alt," and "title," covering the textual content, alternative text, and title of the icon, respectively. Lastly, the "Menu" module uses "text" and "title" for its textual content and title.

The following video shows a template with Heading, Paragraph, and List modules. When the Translate button is clicked, the text within the translatable properties for those modules are translated. The following section displays a JSON example with a translation in Spanish.

Example JSON Translation

Example JSON with Spanish Translation

In the following JSON, English is the primary language and Spanish is set as the translation language.

How to activate

This section discusses the prerequisites and steps you need to take to get started with this feature.

Prerequisites

  • Ensure the Multi-language templates feature is toggled on inside of the Developer Console.

  • DeepL API key

    Note: DeepL offers a free tier for their plans. You can obtain an API key from DeepL for free to get started with this feature.

Activate the addOn in the Developer Console

Take the following steps to activate this feature:

  1. Navigate to the application you'd like install the addOn in.

  2. Install the DeepL addOn.

  3. Provide the requested details.

  4. Save your changes.

Auto Translation Configuration Parameter

Activate this feature by adding the new configuration parameter templateLanguageAutoTranslation and setting it to true.

The following code sample displays an example of the templateLanguageAutoTranslation, templateLanguage, and templateLanguages parameters.

If you have a custom top bar in your application, take the following additional steps:

  1. Describe how to translate a template:

    1. translateTemplatebee.translateTemplate({ language: 'it-IT' })

  2. Describe how to reset a translation:

    1. resetTemplateTranslationbee.resetTemplateTranslation({ language: 'it-IT' })

Error handling

If errors occur, onWarning or onError will be triggered. If the request completes successfully there’s no direct feedback.

The following errors are returned by the backend service when something goes wrong during the translation.

Code
Message
HTTP Status
Details

6001

Unauthorized

401

6050

Generic Error

500

6100

Bad Request

400

E.g. 'sourceLanguage' and 'targetLanguage' must be defined

6150

Validation Error

400

E.g. language X is not supported

6200

Bump service error

[error returned by the Bumper]

E.g. Error while computing the fields to translate

6250

Bump service error

500

E.g. Error while applying the translation

6350

Provider service error

500

[error returned by DeepL]

Last updated

Was this helpful?