The Braze Connector supports the translation of HTML email templates, content blocks, as well as Canvas and Campaign email 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.
Translating Blocks
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' %}
- For example, do not use this:
- 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
It is important that all emails you send for translation include a subject line. Although you can create emails in Braze without a subject line, their API does not support updating emails with empty subject lines. You can edit the subject line at a later stage. If you modify the subject line after it has been translated, only the changes are sent for translation.
Translating Email 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. 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 email 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 only supports the translation of email messages.
-
Create your email message
Ensure your email includes a subject, as emails 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 email.
-
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.
Ensure the email subject is also wrapped in translation tags.
-
Save the email and the Campaign/Canvas
Ensure you have saved both the email 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 email have been completed and delivered back to Braze you can view them in Braze.
Navigate to the email 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.
Files that have been translated previously but have since been updated, the 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
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.