This feature is available from the Pro plan and above.
Use this app to sync your Contentstack data with Lokalise in just a couple of clicks.
Index
Setting up
Adding Contentstack languages
First, you should decide which languages you would like to translate into. Therefore, proceed to Contentstack, open your stack, and clickSettings > Languages:
![](https://downloads.intercomcdn.com/i/o/491394814/4e4b6ffdf87c515abd1a4c87/2022-04-04+17_20_17-Dashboard+_+DevStack+_+Contentstack+%E2%80%94+Mozilla+Firefox.png)
ClickNew language. You'll see the following dialog box:
![](https://downloads.intercomcdn.com/i/o/491395734/b13d2b71530206dcc9bb5808/2022-04-04+17_21_13-Language+Settings+_+DevStack+_+Contentstack+%E2%80%94+Mozilla+Firefox.png)
Here you can either choose one of the predefined languages, or create a custom one. One you are ready, clickAdd.
Configuring Contentstack app
Now let's integrate Lokalise with Contentstack. To achieve that:
Open your Lokalise project.
ChooseAppsin the top menu.
FindContentstackin the apps list and click on it.
ClickInstall. You'll be presented with the following dialog box:
![](https://downloads.intercomcdn.com/i/o/491391948/55a10eeb703cb79237a7ac6f/2022-04-04+17_17_44-Contentstack+_+Lokalise+%E2%80%94+Mozilla+Firefox.png)
To generate a new API key and a management token, return to Contentstack, and clickSettings > Tokens. Switch to theManagement tokenstab and clickAdd token:
![](https://downloads.intercomcdn.com/i/o/491399254/43712649079823019249759c/2022-04-04+17_24_20-Tokens+_+DevStack+_+Contentstack+%E2%80%94+Mozilla+Firefox.png)
You'll see the following screen:
![](https://downloads.intercomcdn.com/i/o/491401267/573480ac968f1423f5979c38/2022-04-04+17_26_20-Edit+a+Token+_+DevStack+_+Contentstack+%E2%80%94+Mozilla+Firefox.png)
You must provide anameand chooseread and writepermissions.
ClickGenerate token和you'll be presented with your API key and a token:
![](https://downloads.intercomcdn.com/i/o/491404308/38dc70d3db6cb2acde403053/2022-04-04+17_28_51-Edit+a+Token+_+DevStack+_+Contentstack+%E2%80%94+Mozilla+Firefox.png)
Simply copy these values and paste them into the corresponding text inputs on Lokalise. Please note that these valuesmust never be publicly exposed!
Once you are ready, return to Lokalise and clickAuthorize. You'll be presented with a empty content list:
![](https://downloads.intercomcdn.com/i/o/491406123/15a7041b355cfa8f48c319f3/2022-04-04+17_31_09-Contentstack+_+Lokalise+%E2%80%94+Mozilla+Firefox.png)
Simply clickRefresh listto fetch data from Contentstack and reload the page. If you ever need to fetch newly created content from Contentstack again, simply click theRefreshbutton.
Importing data from Contentstack to Lokalise
Now that we have everything set up, it's time to choose what content to import from Contentstack to Lokalise. To achieve that, simply tick the checkboxes next to the items you wish to import, and then clickImport selected:
![](https://downloads.intercomcdn.com/i/o/491409691/777aa503d4108d99c52858c1/2022-04-04+17_35_20-Contentstack+_+Lokalise+%E2%80%94+Mozilla+Firefox.png)
You can also narrow the scope by creating a customfilteror by using asearch boxat the top.
After clickingImport selected, you'll be presented with the following dialog box:
![](https://downloads.intercomcdn.com/i/o/491410658/109fb8ac6b8864c237fb9d47/2022-04-04+17_36_11-Contentstack+_+Lokalise+%E2%80%94+Mozilla+Firefox.png)
Import languages— choose which languages you'd like to import from Contentstack (please checkAdding Contentstack languagesto learn how to manage these languages). If your Lokalise project does not contain the chosen languages, these will be created automatically.
Overwrite updated translations— tick this option if you would like to update already imported data on Lokalise with new content from Contentstack.
Skip key creation for empty translations— when enabled, Lokalise will not create translation keys for empty items.
Assign tags— choose which tags you'd like to assign to the imported items.
Once you are ready, clickOK. The import task will be performed in the background, and you'll see a small notification message once it completes. Then you can proceed to the project editor and perform translations as usual:
![](https://downloads.intercomcdn.com/i/o/491414006/ce875de1a645b0f2f208a0cf/2022-04-04+17_40_26-Contentstack+_+Lokalise+%E2%80%94+Mozilla+Firefox.png)
出口数据从Lokalise Contentstack
Once you have finished translating your content, it's time to export it back to Contentstack. To achieve that, open your Lokalise project, proceed toApps > Contentstackand tick the items you wish to export. Then simply clickExport selected:
![](https://downloads.intercomcdn.com/i/o/491415804/3cbfc9177b89d2d5a12cee16/2022-04-04+17_42_09-Contentstack+_+Lokalise+%E2%80%94+Mozilla+Firefox.png)
You'll see the following dialog box:
![](https://downloads.intercomcdn.com/i/o/491415977/631a4f1e55b26cff282f98d9/2022-04-04+17_42_19-Contentstack+_+Lokalise+%E2%80%94+Mozilla+Firefox.png)
Export languages— choose languages that you would like to export translations for. Please note that you will be able to choose only the languages that were added on Contentstackas explained above.
Don't export empty translations— when enabled, Lokalise will ignore all empty translations and these won't be exported to Contentstack.
Once you are ready, clickOK. The export operation will be performed in the background, and you'll see a small notification message once it completes.