This page describes a special version of the Contentful connector that synchronizes all content for a fully automatic translation. To send individual translation requests into Smartcat right from Contentful, use our Contentful App.
Contentful enables you to create, update, and distribute the content of your website, a mobile app or any other platform that displays content. Using the integration between Contentful and Smartcat, you can pull data from Contentful to Smartcat, translate it, and then push it back upon completion.
In Contentful, you can have multiple Spaces (content databases). You will be connecting Smartcat to a particular Space.
Currently the integration supports all Contentful fields enabled for localization, that is all fields with the Enable localization of this field option checked in the Settings.
Pre-requisites
Before configuring the integration, collect the following parameters:
- Space ID
- Content Delivery API token
- Content Management API token
To collect them, log in to Contentful as an administrator and proceed as described below.
Space ID
Navigate to the space whose ID you want to collect.
Click the Settings tab > Space settings > General settings.
The Space ID is shown on the Space Settings page, under the General section.
Content Delivery API token
Contentful uses the Content Delivery API for delivering content to apps, websites and other media. To collect a Content Delivery API token, complete the following steps:
Navigate to the space whose ID you collected in the previous procedure.
Click the Settings tab > Space settings > API keys.
- In the Content delivery / preview tokens tab, click Add API key.
- Copy the string in the Content Delivery API - access token field and save it for further use.
Content Management API token
The Content Management API is used to manage content in user spaces. To collect a Content Management API token, complete the following steps:
Navigate to the space whose ID you collected in the previous procedure.
Click the Settings tab > Space settings > API keys.
- Open the Content management tokens tab and click Generate personal token.
- Provide the token name and click Generate.
- Copy the newly generated token and save it for further use. Make sure to do it before clicking Done; the token will not be available afterwards.
- Click Done.
Configuring the integration
To configure the Contentful integration, log in to Smartcat and complete the following steps.
- Create a new Smartcat project and click Skip when prompted to upload the documents.
- Select the target and source languages as they are defined in the respective Contentful resource.
- Click Finish on the Workflow Stages page.
- Open the Integrations tab and click Connect in the Contentful integration tile.
- In the integration settings provide the following information:
- Space ID: The ID of the environment where the target assets reside.
- Delivery API - access token: The Personal Access Token that you obtained as a pre-requisite
- Management API - access token: The Content Management Token that you obtained as a pre-requisite - Click Create Integration. The Import Translations page is displayed.
- If Smartcat finds pre-existing translations of source articles, you can review them by clicking Import Report.
- To import a translation, check the respective checkbox and click Import.
- To pull the source content only, uncheck all checkboxes and click Import.
Using the integration
If the integration is created successfully, the content of the space whose ID you indicated in the settings is synchronized with the current Smartcat project and all the entries listed on the space page in Contentful appear as Smartcat project documents.
The name of each document created in Smartcat will include the ID of the respective entry.
After a document translation is completed, return to the integration settings, open the Settings tab, enable the option Push translations back and click Sync Now.
The target segments will be pushed to Contentful and appear in the respective entries.
If new source segments were added to the integrated space since the previous sync, the Smartcat documents will be updated accordingly.
By default, a sync disregards incomplete translations. You can, however, instruct the integration to include them in every sync by enabling the option Publish incomplete documents.
Instead of explicitly performing sync by clicking Sync Now, you can schedule a sync at the required intervals. To do this, click on Do not repeat and select the appropriate option from the drop-down menu.