If you have many localizations that use the same language, you can save time and energy by applying the same translation to each localization at once using Locale Groups.
To start creating locale groups, you must have the Organization Adminstrator permission level.
In the Administration dashboard, navigate to the Locales tab.
Name the locale group and add a description. Add localizations to the locale group by filtering localizations at the top and selecting on a localization in the list. A localization will be added to the group if there is a solid check mark icon beside the name.
Once you have selected all the localizations you want in the group, select the Create Locale Group button.
To apply a locale group to an email, go to the localizations tab in the Dyspatch Visual Editor. Create a new localization and in the dropdown menu, select the locale group by typing in the name matching the group.
You can now go through the same localization process as outlined in our Localizing an Email guide. Applying a new PO file will now create all localizations for the matching locale group.
The 2020.04
version of the API introduced the localeGroup
parameter. This provides you an ID for any created locale groups in your account and can be used to apply translations to a group.
Request URL
GET https://api.dyspatch.io/drafts/tdft_01dwde5bkh1znw5krbskv/localizations
Response
[
{
"id": "loc_01dwdmm8p7n3kkvdx7dbn",
"language": "",
"localeGroup": "lg_01dvxt2wr1gcvkxf85a5f",
"name": "All English Localizations",
"url": "https://api.dyspatch.io/localizations/loc_01dwdmm8p7n3kkvdx7dbn"
}
]
Request URL
PUT https://api.dyspatch.io/drafts/tdft_01dwde5bkh1znw5krbskv/localizations/lg_01dvxt2wr1gcvkxf85a5f
Request Body
{
"name": "All English Localizations"
}
Response
200 OK
Request URL
PUT https://api.dyspatch.io/drafts/tdft_01dwde5bkh1znw5krbskv/localizations/lg_01dvxt2wr1gcvkxf85a5/translations
Request Body
{
"bienvenue en %(company_brand)s": "welcome to %(company_brand)s",
"merci pour l'enregistrement!": "thanks for signing up!",
}
Response
200 OK
For a detailed example and walkthrough using the API, take a look here: Update Values in Dyspatch