DeepL
Automatically translate content for different language templates using the DeepL addOn.
The DeepL AddOn is only available for Superpowers and Enterprise plans.
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 different language versions of their designs. Also, now your end users can have up to six different language versions of their designs. 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 |
---|---|
|
|
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
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.
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:
Log in to the Beefree SDK Developer Console.
Navigate to the application you'd like install the addOn in.
Install the DeepL addOn.
Provide the requested details.
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:
Describe how to translate a template:
translateTemplate
→bee.translateTemplate({ language: 'it-IT' })
Describe how to reset a translation:
resetTemplateTranslation
→bee.resetTemplateTranslation({ language: 'it-IT' })
Translate a Template
A function to translate the template to a specified language using the Beefree SDK.
React Translate a Template example
Reset a Translation
A function to reset the translation of the template to its original state using Beefree SDK.
React Reset a Translation example
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