Skip to main content
Contentstack

Sync Contentstack data with Lokalise.

Ilya Krukowski avatar
Written by Ilya Krukowski
Updated over 2 months ago

This feature is available from the Pro plan and above.

Contentstack is a headless content management system (CMS) that helps teams manage and deliver digital content across various platforms. It’s known for its flexibility and ease of use, making it a great tool for content creators and developers.

Use this app to sync your Contentstack data with Lokalise in just a couple of clicks, making localization a breeze.

Setting up

Adding Contentstack languages

First, decide which languages you'd like to translate. Head to Contentstack, open your stack, and navigate to Settings > Languages.

View image

Click New language, and you'll see a dialog box like this:

View image

Here, you can either select a predefined language or create a custom one. Once you've made your choice, click Add.

Configuring the Contentstack app

Now, let's integrate Lokalise with Contentstack. Follow these steps:

  1. Open your Lokalise project.

  2. In the top menu, select Apps.

  3. Find Contentstack in the list and click on it.

  4. Click Install. You'll be presented with a dialog box like this:

View image

To generate a new API key and management token, go back to Contentstack and navigate to Settings > Tokens. Switch to the Management tokens tab and click +Management Token.

View image

You'll then see this screen:

Provide a name for the token and select read and write permissions.

Click Generate token, and you'll receive your API key and token:

View image

Copy these values and paste them into the corresponding fields in Lokalise. Be sure to keep these values private and never share them publicly!

Once you're done, return to Lokalise and click Authorize. You'll see an empty content list at first:

Click Refresh list to fetch your data from Contentstack. Whenever you need to retrieve newly created content from Contentstack, simply hit the Refresh button again.


Importing data from Contentstack to Lokalise

Now that everything is set up, you can choose what content to import from Contentstack to Lokalise. To do this, simply check the boxes next to the items you want to import and click Import selected:

You can also refine your selection by using the search box at the top or creating a custom filter.

After selecting your content, you'll see the following dialog box:

  • Import languages – select the languages you'd like to import from Contentstack (refer to the Adding Contentstack languages section for details on managing languages). If your Lokalise project doesn't have the selected languages, they will be created automatically.

  • Overwrite updated translations – enable this option to update already imported translations in Lokalise with the latest content from Contentstack.

  • Skip key creation for empty translations – if enabled, Lokalise won't create translation keys for items with no content.

  • Assign tags – select which tags to assign to the imported items.

Once you're ready, click OK. The import will run in the background, and a notification will appear once it's complete. You can then proceed to the project editor and begin translating as usual.

View image


Exporting data from Lokalise to Contentstack

After completing your translations, it’s time to export them back to Contentstack. To do this, follow these steps:

  1. Open your Lokalise project and go to Apps > Contentstack.

  2. Select the items you want to export by ticking the checkboxes.

  3. Click Export selected.

You’ll be presented with the following options:

  • Export languages – choose the languages you wish to export. Keep in mind, you can only select languages that were added to Contentstack (as described in the Adding Contentstack languages section).

  • Don't export empty translations – enable this option to skip exporting any empty translations.

Once you’ve made your choices, click OK. The export will run in the background, and you'll get a notification once it’s finished.


Known issues

Unique IDs

When you define a content type in Contentstack, each field gets a unique ID based on its display name. If you later modify this ID, the Contentstack Lokalise app will generate a new key name, which is critical because the integration relies on consistent key names. However, changing the display name alone won’t affect the existing Lokalise key linkage.

If you modify a field's unique ID in Contentstack, here's what will happen:

  • In Contentstack: The content in that field (for all entries using this content type) will be removed.

  • In the Lokalise app:

    • After pressing the Refresh button, the old entries will be replaced with new ones.

    • During the next import, Lokalise will generate new keys with different names.

    • When exporting, the new keys will be used instead of the originals, and the original keys will no longer be linked to the Lokalise app.

Did this answer your question?