Using Locale Groups to Group Similar Localizations

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.

Creating Locale Groups

To start creating locale groups, you must have the Organization Adminstrator permission level.

In the Administration dashboard, navigate to the Locales tab.

Locale Group menu item in the adminstration dashboard

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.

Locale Group creation screen with select items, name, and description

Once you have selected all the localizations you want in the group, select the Create Locale Group button.

Using Locale Groups

To apply a locale group to a template, 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.

By default all locale groups will appear at the top of the list and will automatically update the name to the matching locale group name.

Adding a locale group to a template via a localization

You can now go through the same localization process as outlined in our Localizing a Template guide. Applying a new PO file will now create all localizations for the matching locale group.

Getting Locale Groups via API

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.

Get Locale Group ID

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"
  }
]

Create Locale Group

Request URL

PUT https://api.dyspatch.io/drafts/tdft_01dwde5bkh1znw5krbskv/localizations/lg_01dvxt2wr1gcvkxf85a5f

Request Body

{
	"name": "All English Localizations"
}

Response

200 OK

Apply Translations for Locale Group

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

search icon

Didn't find what you're looking for?

Ask our support team, we're here to help!

Contact Support