Contentful integration

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

  1. Navigate to the space whose ID you want to collect.

  2. Click the Settings tab > Space settings > General settings.

  3. The Space ID is shown on the Space Settings page, under the General section.

Integrations_CF_01.png

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:

  1. Navigate to the space whose ID you collected in the previous procedure.

  2. Click the Settings tab > Space settings > API keys.

  3. In the Content delivery / preview tokens tab, click Add API key.
  4. Copy the string in the Content Delivery API - access token field and save it for further use.

Integrations_CF_02.png

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:

  1. Navigate to the space whose ID you collected in the previous procedure.

  2. Click the Settings tab > Space settings > API keys.

  3. Open the Content management tokens tab and click Generate personal token.
    Integrations_CF_03.png
  4. Provide the token name and click Generate.
  5. 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.
  6. Click Done.

Configuring the integration

To configure the Contentful integration, log in to Smartcat and complete the following steps.

  1. Create a new Smartcat project and click Skip when prompted to upload the documents.
  2. Select the target and source languages as they are defined in the respective Contentful resource.
  3. Click Finish on the Workflow Stages page.
  4. Open the Integrations tab and click Connect in the Contentful integration tile.
    Integrations_CF_11.png
  5. 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
    Integrations_CF_12.png
  6. Click Create Integration. The Import Translations page is displayed.
    Integrations_new_05.png
  7. 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.

Integrations_CF_06.png

The name of each document created in Smartcat will include the ID of the respective entry.

Integrations_CF_07.png

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.

Integrations_new_06.png

The target segments will be pushed to Contentful and appear in the respective entries.

Integrations_CF_09.png

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. 

Was this helpful?

0

Similar articles:

    No related articles