The Braze Connector supports the translation of HTML email templates, content blocks, Canvas and Campaign email messages, as well as Apple and Android push messages. Translations are requested from within the Smartling platform, and translated content is automatically sent to Braze.
Once the Braze Connector has been connected and set up, you will find Braze content in the Braze tab in your Smartling project. Here, you will be able to manage the translation process. From the Braze tab, you will be able to request and authorize content for translation.
Braze Translation Tags
Braze translation tags are special identifiers used to manage the translation process. To have content ingested into Smartling for translation, it must be wrapped in liquid script translation tags. The exact process for adding these tags varies depending on the type of Braze content you are working with. For translating legacy content blocks, the process is slightly different. See the section below for details.
Here is an example of an HTML Email campaign with translation tags.
Translating Content Blocks
The New Content Block content type uses Braze's Translation API to manage translations. This is the same approach used by Campaigns and Canvas content types, and it does not require liquid conditional logic in your source content.
If you are translating content blocks, translation tags must be manually added to the content blocks for both HTML and drag-and-drop content block editors. Locales are selected at the campaign level, not on the content blocks themselves. Once a content block is added to an email template, Campaign, or Canvas, translations are managed at that level (i.e., locales are selected at the template, Campaign, or Canvas level, not on the content blocks themselves).
We recommend using the Row function to insert content blocks into your message instead of manually adding them with a liquid tag. Note that dragging a content block from the preview into an email creates a local copy; any changes to the "parent" content block will not propagate to other campaigns using that block.
If you do use a content block liquid tag, be sure to include at least one translation tag directly in the email body. Manually adding the translation tag will allow you to select the locales from the multi-language dropdown. The connector will pick up the translation tags for the content block. You can add a 'comment' tag to ensure the text is not visible to the end user.
Do not use the New Content Block and Content Block (Legacy) types for the same content. Mixing the two may result in errors and duplicated translations. If content has been submitted using the New Content Block type, attempting to resubmit the same content using Content Block (Legacy) will result in an error.
Translating Content Blocks (Legacy)
The Content Block (Legacy) asset type is deprecated and will be removed in a future release. We recommend using the New Content Block type for all new translation requests. See Translating Content Blocks above.
Braze Content Blocks can be used to translate Campaigns, Canvases, and emails. Here are some important considerations to follow when translating Blocks:
-
All blocks must have the following structure:
{% if ${language} == 'en' %} This is a message in English from Braze! {% else %} This is a message from Braze! This will go to anyone who does not match the other specified languages! {% endif %}Where "en" is locale code configured as "Source Language (Braze)" under the Language Configuration of your Braze Connector Settings.
- The connector will parse the condition block for the Source Language and ingest it as source content. In other words, in the above example, only "This is a message in English from Braze!" string will be ingested.
-
On delivery, the connector creates or updates language blocks. This is how the block will appear after delivery.
{% if ${language} == 'en' %} This is a message in English from Braze! {% elsif ${language} == 'es' %} Este es un mensaje en español de Braze ! {% elsif ${language} == 'zh' %} 这是一条来自Braze的中文消息。 {% else %} This is a message from Braze! This will go to anyone who does not match the other specified languages! {% endif %}
Limitations
- Content must be smaller than 50kb, which includes: liquid script, HTML tags, user content, source and translations.
- Language blocks must have liquid script or follow rules. If this is missing, the Connector can't find them and the Request Translation will fail.
-
Always use a single quote (') for a locale code instead of a double quote (").
-
For example, do not use this:
{% if ${language} == "en" %}use this:
{% if ${language} == 'en' %}
-
- Smartling reads and writes content using a simplified liquid parser. As a result, it may fail to parse language blocks in complex scripts.
- For example, "if" inside "switch" inside another "if"
- Keep the language blocks at the top of your code.
Translating Email Templates
All emails you send for translation must include a subject line. Although you can create emails in Braze without a subject line, the Braze API does not support updating emails with empty subject lines. You can edit the subject line at a later stage; if you modify it after it has been translated, only the changes are sent for translation.
The connector supports two Email Template content types:
- New Email Template - the current, recommended type.
-
Email Template (Legacy) - deprecated. This type is still visible in the file list, but all new translation requests should use New Email Template instead.
Once a template has been submitted for translation using one type, you cannot resubmit the same email template again using the other type. Attempting to do so will result in an error.
Translating Messages
Braze allows you to connect with your users through various messaging channels. Currently, Smartling's Braze Connector supports the translation of Campaign and Canvas email messages, in-app messages, as well as Apple and Android push notifications. Certain prerequisites must be met to ensure the content can be sent to Smartling for translation and be delivered back to Braze successfully.
To translate messages please follow the steps below:
-
Create your Campaign or Canvas in Braze
When you create a Campaign or Canvas, you can select which messaging channels you wish to use (Email, Push notification, In-app message, etc.) At this time, Smartling supports the translation of email messages, in-app messages, and Apple and Android push notifications.
-
Create your message
If creating an email, ensure it includes a subject, as email messages must have a subject to be requested for translation. -
Select multi-language locales for your email
Under Content click Multi-language, then select the target locales needed for the message.
-
Prep the content for translation
All text and image or link URLs intended for translation need to be wrapped in a translation tag in order to be captured for translation in Smartling.
Translation tags follow the format:{% translation [unique id] %}Your text for translation.{% endtranslation %}
To generate translation tags for your content, click Add Personalization. Under Personalization type select Translation Tags. Next, enter a unique ID value for the text. (e.g., header 1, subheader, etc.) Then you can copy the Liquid Snippet containing the translation tags. Alternatively, you can manually type the translation tags directly in the email editor.
If translating an email, ensure the email subject is also wrapped in translation tags.Any updates made to the source content must be re-requested for translation. Otherwise, the connector will be unable to deliver translations, as Braze expects source strings to align with their corresponding translations. If the content is out of sync, it will result in a translation delivery error.
-
Save the message and the Campaign/Canvas
Ensure you have saved both the message and the Campaign or Canvas. If your Campaign or Canvas is still in draft status, you will see the "Save as Draft" button. Draft content can be requested for translation, but it must be saved first. -
Request the content for translation from within Smartling
A folder icon is displayed next to the name of each Campaign or Canvas. Click on the name to navigate within the folder. Inside the folder, you can select the emails you wish to translate.
Follow the steps outlined below to request translations. Keep in mind that all your messaging content will be displayed in Smartling. However, only the email assets eligible for translation will have a checkbox next to them.
Smartling Filters cannot be used at the Campaign or Canvas level, as translation progress is monitored at the email level. However, once you navigate within a specific folder, you can use the Smartling Filters. -
View translated emails in Braze
Once translations for the message have been completed and delivered back to Braze you can view them in Braze.
Navigate to the message in Braze > Select Preview and Test > Under Preview message as user select Multi-language User
Click on the name of a locale to preview the translated email.
Request Translations
There are two ways in which you can Request Translation;
1) Select the asset > Actions > Request Translation. This option also allows you to select multiple assets for translation.
2) Click the information icon of an asset > Request Translation. This option allows you to request translation for only that individual asset.
Both options will open the Request Translation wizard.
The Request Translation two-step wizard will appear for you to enter the Job details. You can choose to create a New Job or add the asset to an Existing Job.
- Insert the Job Name - the title for the translation task in Smartling.
- Ensure the file selection is correct. Click the X to remove any asset listed.
- Insert a description for the linguists, if desired.
- Select the Target Languages.
- Click Save Job and Continue to create the Job in Smartling.
The next step will display the Job Processing. Once the processing is complete, the Authorize Job button will activate by turning blue. Click Authorize Job to set a Job Due Date, choose the workflow and submit the asset(s) for translation.
Translation Delivery to Braze
As translations are completed, they are automatically sent to Braze. Files that have never been translated in Smartling before are delivered back as soon as the file has been translated in Smartling.
For files that have been translated previously but have since been updated, translations are returned to Braze immediately.
You can always get the translation to Braze manually as well. To perform a manual export of translated content from Smartling to Braze:
- From your Braze project, click the Braze tab
- Select the translated assets to download (Bulk-Select and Export is supported)
- Click Actions and select Export Translation
Content Blocks
For the New Content Block type, translations are managed at the email template, Campaign, or Canvas level — not on the content blocks themselves. The connector picks up translation tags from the content block when it is embedded in a parent asset.
For the Content Block (Legacy) type, Smartling delivers translated content blocks within the original (source) content block, meaning one block in Braze contains all languages, including the source.
Emails with Blocks
If an email contains a block, Smartling does not automatically ingest the block. The block contained in the email must be translated separately.
Editing Translations in Smartling
If you update the translations in Smartling, the updated translations will be delivered back to Braze within the scheduled cron.