Integrations

Contentful (TMS)

Content is machine translated from English by Phrase Language AI.

Available for

  • Business and Enterprise plans (not available for LSP plans)

Get in touch with Sales for licensing questions.

Available for

  • Enterprise plan (Legacy)

Get in touch with Sales for licensing questions.

Tip

For information about Contentful integration in Phrase Strings, refer to Contentful (Strings).

Contentful provides a headless content management infrastructure to create, manage and distribute content to any platform or device. Phrase integrates with Contentful in two ways: 

  • Via a dedicated Contentful connector (2.0, Entry-Level, Field-Level)

    The Contentful 2.0 connector currently supports authentication via the US Data Center only.

  • Via the Contentful Marketplace plugin for a customized experience

Note

The connector does not support the translation of JSON objects.

Supported Localization Methods

Contentful supports multiple localization methods. See Contentful documentation for their detailed description.

The Contentful 2.0 connector is the current and preferred integration that supports field-level localization. It also offers:

  • Multiple spaces

  • Environment aliases

  • Preview URL setup

  • Reference import

  • Tag-based content filtering

  • Live preview configuration

Entry-Level Localization (Legacy)

Use Contentful (Entry-Level) connector.

The entry-level connector only works with content types that have localized reference fields (e.g., a reference field called Localized that is enabled for localization).

Field-Level Localization (Legacy)

Use Contentful (Field-Level) connector.

The field-level connector only works with content types that have a translatable field (e.g., either Text or Rich Text field with enabled localization) and optionally Media Assets. It imports referenced entries and their translatable fields (if reference fields are localized).

Note

The legacy connectors are no longer actively maintained but remain operational.

Use Cases

There are a number of use cases for the connector:

  • Project managers can add files directly to projects from an online repository. Content is searchable by Entry ID.

  • Set up the submitter portal so Submitters can add files to requests directly from the online repository. Content is searchable by Entry ID.

  • Use automated project creation (APC) to have new projects automatically created when a change in the content size is detected for monitored documents or a folder.

Use cases for the application:

  • Content editors can directly submit an entry for localization from within Contentful. This allows content editors or managers having full control over the localization flow and having status updates on-the-fly when viewing an entry.

    Once the entry has been finalized:

    • Select the desired target languages for localization.

    • Submit only the entry with the selected languages to Phrase TMS or use the Field selection tab to select fields.

      • If no fields are selected, all localizable fields are submitted for translation.

      • If a non localizable field is selected, that field will still not be submitted for translation. Only localizable fields are submitted.

      • If only some localizable fields are selected, only those fields will be submitted for translation.

    • Based on APC settings, jobs are automatically created from the submitted content. During APC runs, only entries in the submitted status are picked up for job creation.

    • Once jobs from a submitted entry are created, the status changes to in progress. When the translations are pushed back to Contentful, the status changes to completed.

    • Previously translated entries can be re-submitted after changes in original copy.

  • Content editors can use the Phrase TMS home screen to:

    • Submit entries in bulk.

    • Specify individual target languages while bulk submitting.

    • Have an overview of active translation jobs.

Contentful Settings

When working with Phrase TMS application:

  1. Download the Phrase TMS application from the marketplace.

  2. Install the application to the current active space and select the content models where the application requires installing.

  3. Enter the Phrase TMS Auth token acquired when creating the connector within Phrase TMS.

  4. Click Install.

Optional - Launch App (deprecated by Contentful)

If using workflow support via the Launch App by Contentful, follow these steps:

  1. Install Contentful's Launch application to one or more spaces.

    Note

    Only one workflow can be created per space. If different approaches for content types are required within one Contentful space, contact the dedicated Customer Success Manager.

  2. Set up the required localization workflow.

  3. Select content type or types that follow the described workflow.

If workflows in a connector are set, Automated Project Creation (APC) will automatically create new projects when a change in the workflow steps is detected for monitored articles or content types.

Submitted jobs can be cancelled allowing content to be resubmitted after changes are made. These jobs will still exist in Phrase and will need to be deleted by a project manager.

Phrase TMS Settings (Contentful 2.0)

Note

The Contentful Launch App is not supported in the 2.0 connector.

  1. From the Settings Setup_gear.png page, scroll down to the Integrations section.

  2. Click on Connectors.

    The Connectors page opens.

  3. Click New connector.

    The Create connector page opens.

  4. Change the Type to Contentful 2.0.

  5. Provide a name for the connector.

  6. Click Connect to Contentful 2.0.

    The Contentful login window opens.

  7. Provide login details and click Log in (or use alternate login methods). The login window closes and Connected is displayed.

  8. Optionally select the Phrase Contentful App checkbox if using the connector with the app.

    1. Click Generate token.

      The Generate Contentful Token window opens.

    2. Click Generate token.

      A token is generated that should be copied to the clipboard or a text file. Ensure the token is copied before closing the window as it will not be visible again. This token will be used when connecting to the app.

    3. Close the window and Token generated is displayed.

  9. If Contentful Tags are used to identify translatable content, enter a tag ID and press Enter.

    The ID is presented and more can be added.

    • Select listing strategy

      • With all tags 

        Displays content within Contentful with all tags listed.

      • With at least one tag 

        Displays content from Contentful with at least one of the tags listed.

  10. If required, select to Include assets.

  11. If required, select Include referenced entries (nested content).

    The Referenced entries settings are displayed. Apply the desired filters to establish more granular control over how the system traverses through content relationships.

    • Set import depth for linked entries 

      Limits how far Phrase follows references entries during import.

      Default value is 10,000. If required, select other values or specify a custom integer value.

    • Content type

      Select whether to stop at or follow entries whose content type matches the specified list.

    • Parent content types

      Exclude entries whose parent content type matches the specified list.

    • Tags

      Select whether to stop at or follow entries which have any of the specified content tag(s).

    • Field IDs

      Select whether to stop at or follow entries that are referenced by the specified field IDs.

  12. If required, select Include taxonomy.

    The Contentful Organization ID field is displayed. Enter a value to enable taxonomy setting.

    • When selected, the connector fetches taxonomies from Contentful and includes them in the .XLIFF file. The Context note pane of the CAT editor will list the Contentful taxonomy values for each segment.

    • If taxonomy metadata is not available or the connector is not configured with it, the Context note pane is simply omitted.

    • If a project does not require feature/screen context, it is recommended to leave taxonomy disabled to optimize performance upon .XLIFF export.

  13. If required, select Follow aliases.

    The alias is used for all APC monitoring and job reimports/exports. If the alias target is changed in the future, APC monitors the content in the new target and jobs will be reimported/exported from/to the new alias target.

    • Disabled (default and recommended)

      APCs and created jobs are tied to the environment the alias was pointing to at the time of job/APC creation. APCs only monitor that environment and content; jobs are exported and reimported to it.

    • Enabled 

      APCs and created jobs are tied to the alias itself. APCs only monitor that alias and content; jobs are exported and reimported to it.

      If the alias target is changed, APCs monitor the new alias target (environment); jobs will now export and reimport to it.

  14. If required, provide the Preview URL.

    This is the URL template leading to the rendered content from Contentful. The following placeholders are supported:

    • {env_id}: Environment ID

    • {entry.id}: Entry ID

    • {space_id}: Space ID

    A URL template may look like this:

    https://contentfulapp.tld/?spaceId={space_id}&environmentId={env_id}&entryId={entry_id}

    Note

    The URL must lead to a deployed application which renders the Contentful content. To use the live preview, replace contentfulapp.tld in the URL template with the actual domain of the application.

    Refer to Contentful documentation for more information about setting up content preview.

    Locale is not supported as a placeholder at the moment. To use locale in the URL, specify a fixed value and create multiple connector instances.

  15. If required, provide ContentIDs that should be omitted from import to Phrase.

  16. Provide Space ID and Token for Space preview token map (required).

    The Preview API requires a Contentful access token named Content Preview API – access token that should be configured in the Contentful space’s API settings.

    The Contentful 2.0 integration uses this API for importing content and monitoring changes (APC).

    • Select each space and environment to monitor/import from Contentful.

    • Setup and access are managed within Contentful itself.

  17. Click Save.

    The connector is added to the list on the Connectors page.

Phrase TMS Settings

Important

If accessing from a custom domain (ex. mydomain.phrase.jp), open an incognito browser window and log in via cloud.memsource.com or us.cloud.memsource.com to apply the authentication required for the creation or saving of the connector. After saving, the connector can be accessed via the custom domain.

  1. From the Settings Setup_gear.png page, scroll down to the Integrations section.

  2. Click on Connectors.

    The Connectors page opens.

  3. Click New connector.

    The Create connector page opens.

  4. Change the Type to either Contentful (Entry-Level) or Contentful (Field-Level) and provide a name for the connector.

  5. Optionally select the Phrase Contentful App checkbox if using the connector with the app.

    • Contentful App token

      Generate an app token to be entered into the Phrase TMS Contentful application. Save the connector after generating the token and copying it into the Contentful App.

    Note

    Once saved, the token cannot be changed from within Contentful. To update it, revoke the token from the connector configuration in Phrase TMS and generate a new one.

  6. Configure language agnostic settings.

    • Source language

      Select a source language to overwrite the Contentful default language. The connector will then pull in content from the language set up in the connector configuration.

      Example:

      If EN-US is set as the default language in Contentful, but DE-DE is required as the source language for localization in a specific space or content model, the configuration can be adjusted so that the space (remote folder) pulls content from DE-DE instead of EN-US.

    Note

    Not applicable when using the application.

  7. Select how to process nested content through Entry import mode. Content can use a reference field to reference other content allowing the creating a hierarchy of entities.

    Note

    Not applicable when using the application.

    • Contentful (Entry-Level)

      The entry-level connector automatically traverses the entire hierarchy of nested content.

    • Contentful (Field-Level)

      Select how the field-level connector should import nested content.

      • Selected entry only

        • Content that is explicitly selected when adding from the repository is imported.

        • Changes detected by APC are imported for translation.

      • Import referenced entries

        • The connector traverses the entire hierarchy of nested content and imports all translatable fields for translation.

  8. Create a comma-separated list in Omit translatable fields to omit fields that are checked for Enable localization of this field from import to Phrase TMS. Use the following structure: contentTypeID:fieldID.

    • Select Leave omitted fields empty if the listed fields should be left empty. This setting will be applied to all listed entries.

    • Select Copy source to target if the listed fields should contain source values. This setting will be applied to all listed entries.

  9. Select Use fallback language if data is missing for a particular field in the source language.

    Select a Source language fallback from the dropdown list if required. This language locale will be used in the case of missing data.

    Note

    There is no relationship between the Contentful fallback language and this setting.

  10. If required, provide the Live preview URL (BETA).

    This is the URL template leading to the rendered content from Contentful. The following placeholders are supported:

    • {env_id}: Environment ID

    • {entry.sys.id}: Entry ID

    • {space_id}: Space ID

    A URL template may look like this:

    https://contentfulapp.tld/?spaceId={space_id}&environmentId={env_id}&entryId={entry.sys.id}

    Note

    The URL must lead to a deployed application which renders the Contentful content. To use the live preview, replace contentfulapp.tld in the URL template with the actual domain of the application.

    Refer to Contentful documentation for more information about setting up content preview.

    Locale is not supported as a placeholder at the moment. To use locale in the URL, specify a fixed value and create multiple connector instances.

  11. If logging of debug information is requested by technical support team, select Log debug information.

  12. Click Connect to Contentful.

    A checkmark will appear in the connector setup if the connection was successful. A red exclamation point will appear if it wasn't. Hover over the icon to see additional details.

  13. Contentful (Entry-Level) only:

    Set the Source language.

    Note

    This language should match the Default locale of the Contentful space that's configured in Contentful's Locales settings.

  14. Click Save.

    The connector is added to the list on the Connectors page.

  15. Optionally, edit the connector to select Contentful workflows.

    • Translate articles from:

      The connector monitors articles in the selected stage (e.g. Translate). The author can apply this label to articles when ready for translation.

    Upon import from Contentful:

    • Set source articles to

      The connector advances the workflow to the selected stage (e.g. Translation in Progress) when the source articles are downloaded.

    Upon export to Contentful:

    • Set source articles to

      The connector sets the workflow stage of the source articles to the selected stage (e.g. Translations Completed) when the translation is exported.

    Note

    Workflow support was discontinued by Contentful on June 1, 2023. Continued use is not supported.

Was this article helpful?

Sorry about that! In what way was it not helpful?

The article didn’t address my problem.
I couldn’t understand the article.
The feature doesn’t do what I need.
Other reason.

Note that feedback is provided anonymously so we aren't able to reply to questions.
If you'd like to ask a question, submit a request to our Support team.
Thank you for your feedback.