Crowdin

Introduction

Crowdin is a cloud-based software for localization management. Crowdin helps in streamlining the localization of your app's user interface, website, marketing, and support content. This can help you deliver the content in multiple languages.

MoEngage <> Crowdin

MoEngage and Crowdin integration allows you to pull your Crowdin translations in MoEngage campaigns using Content APIs. You can use the translated content in your email templates, content blocks, or as message in campaigns. 

Integration 

 

PREREQUISITES

Step 1: Get your Crowdin Personal Access Token

To work with Crowdin API v2 generate the personal access token by going to Crowdin Account Settings > API & SSO > New Token.

Step1.png

Step 2: Test your API

Use the below cURL to test out your results and the order of the strings. You can also choose to get translations by a resource string key. View all the configurations here.

curl --request GET 'https://api.crowdin.com/api/v2/projects/{PROJECT-ID}/translations?stringId={STRING-ID}&languageId={LANGUAGE-ID}' \
     --header 'Authorization: Bearer {YOUR-BEARER-TOKEN}'

Make sure to replace the bold placeholders with actual values before testing. Here is a sample response:

{
    "data": [
        {
            "data": {
                "id": 2,
                "text": "Bonjour et bienvenue à Transifex!",
                "pluralCategoryName": null,
                "user": {
                    "id": 15332500,
                    "username": "****",
                    "fullName": "****",
                    "avatarUrl": "https://crowdin-static.downloads.crowdin.com/avatar/****/medium/****.png"
                },
                "rating": 0,
                "createdAt": "2022-06-27T07:57:47+00:00"
            }
        }
    ],
    "pagination": {
        "offset": 0,
        "limit": 25
    }
}

Step 3: Setup Content APIs in MoEngage Dashboard

Use MoEngage Content APIs to add Crowdin as one of your data sources. You can add multiple APIs from Crowdin at the same time for each use case.

Setting up the API

  1. Navigate to Settings >> APIs >> Content API.
  2. Click Add
  3. Add your Crowdin API to the endpoint URL.

API URL

https://api.crowdin.com/api/v2/projects/{YOUR-PROJECT-ID}/translations

Make sure to replace the placeholders in bold with actual values.

Headers

Parameter Description Example
Authorization
Required. API Bearer key.
Bearer SGVyZSBpcyBhbiBleGFtcGxlIG9mIHlvdXIgQVBJIGtleS4=

 

Step2.png

Parameters

Parameter Description Example
stringId
The string ID of the original string.
123

 

languageId

Filter by language.
fr
Step3.png
 
  1. Click Save. Now, you will see your Crowdin API added in MoEngage.

Note - You can also test your APIs by clicking on the Test button. Validate your response.

Step 4 - Using content APIs in MoEngage campaigns

You can now use these content APIs in your campaigns. Read here to know more about Content APIs.

  1. On step 2 on your campaign creation, enter @.
  2. In the pop up, you can select the Content API configured in Step 2.
  3. You can use MoEngage Templating Language to parse through the API response and use the content in your campaigns.

Step4.png

You can click on the Preview tab to view your campaign in real-time personalisation:

Step4B.png

Was this article helpful?
0 out of 0 found this helpful