Contentful Connector

Set Up the Contentful Connector

This article is for Account Owners.

Once you have enabled localization in Contentful, it is now time to set up the Contentful Connector in Smartling.

Create a Contentful Connector Project

  1. Log in to Smartling.
  2. From the Account Dashboard, click Create New Project.
  3. Select the Connector tab and click Next.
  4. In the Project Details dialog box, enter the following:
    • A name for your project.
    • The connector type (Contentful).
    • The linguistic package.
    • The target languages.
  5. Click Create Project.

Once you have created the Contentful connector project, it will appear in the left navigation. (Go  to Projects > Connectors > Contentful.)

Configure Contentful User Permissions

Before connecting Smartling to your Contentful account, you should decide which user account will be used, and verify its permissions. Smartling will update your entries with translations on behalf of your Contentful user account. Therefore, it's important to give this user permission to edit, while still restricting access to spaces which you don’t plan to localize. We recommend creating a new user account with a self-descriptive name.

  1. Create the new role. You'll need to repeat the steps below for each space that you will be translating.
    • Go to Settings > Roles & Permissions.
    • Click Create new role from the right hand side.
    • Role details: Name (Smartling connector role) and description.
    • Content: Create two rules:
      • Read - Any entry - All content types
      • Write - Any entry - All content types - All fields - All locales
    • Media: Create the same two rules as above.
    • Content model: Leave this unchecked.
    • API keys: Only check Can access existing API keys for this space.
    • Space settings: Leave this checked.
  1. Invite a new user and add him to the new role
    • Go to Organization settings > Users.
    • Click Invite user.
    • Enter the new user email. This is the email that you'll be using when connecting Smartling to the Contentful account.
    • Organization role: member
    • Access to space: Check Smartling connector role for only the spaces that have content to be translated. The screenshot below shows that Smartling will have access to only the Sample project space.

Check your inbox and complete the invitation. When Smartling asks you to allow access to the Contentful account, use the user email and password.

If your Contentful plan doesn’t allow you to add new roles, you'll need to use the Admin role for your user.

Connect Smartling and Contentful Accounts

  1. Go to Projects (select your Contenful project) > Connectors > Contentful Content.
  2. Click Login to Contentful to connect your Contentful account with the Smartling Contentful Connector.login_contentful.png
  3. If you are already logged in to Contentful, you will be prompted to authorize the Smartling Contentful Connector to use your account. Click Authorize.

    If you are not already logged in to Contentful, you will be redirected to the Contentful login page and prompted to enter your credentials. You will then be brought to the Smartling Contentful Connector page.

Configure Languages

In the following steps, you will create a mapping for target locales enabled in Contentful to locales in Smartling. Target locale refers to the specific version of a language, for example, French (Canada).

Smartling supports all Contentful languages.

To map Contentful locales to Smartling locales:

  1. Go to Projects (select your Contenful project) > Project Settings > Contentful Settings.
  2. In Language Configuration, select the languages for which you need content translated.
    The main languages are the ones that originated from Contentful. For example, Afrikaans (South Africa). The languages in the drop downs originated from Smartling. For example, French (Canada).
  3. Click Save.

A "wrong locales mapping" error will occur when attempting to use the same Smartling locale, twice, in the Language Configuration.

Configure Contentful Model Fields

When Smartling captures content from Contentful it may processes the fields of an entry based on your configuration settings and may break down the individual fields into even smaller strings for translation. This process makes it easier to produce higher quality translations, faster.

Follow the steps below to configure how Smartling should handle fields based on how your content editors are allowed to format them in Contentful.  We support plain text / markdown, HTML, and Contentful Rich Text.

Do not translate

Use this if the field shouldn't be translated at all.

Simple Markdown

Only available to clients who started using the connector before we officially supported Markdown. This configuration treats markdown tags as "placeholders".

Legacy configuration only. User can choose to upgrade to Markdown. Doing so will create new strings that must be re-translated in Smartling.

Markdown Parses markdown tags similar to HTML tags for the best experience by translators and maximum Translation Memory leverage. Use this when your field is likely to have markdown.  
Plain text All text and characters treated as plain text.  Use this for fields that you expect to only have plain text with no markup or formatting.  
HTML Parses the field's HTML tags for the best experience by translators and maximum Translation Memory leverage.  Use this when your field is likely to have HTML markup in it  
Rich Text Only available if the field is Rich Text. Select this to capture the content for translation using are custom rich text parser for Contentful.  

By default, Smartling will assume that content is formatted as plain text / markdown.

  1. Go to Projects (select your Contenful project) > Project Settings > Contentful Settings.
  2. In Content Parsing, select your Contentful and Content Model type from the drop down menus. A list of all enabled localization fields will appear.
  3. For each field, decide whether or not it requires translation, and if so, which parser should be used for that field.
  4. Click Save.

All of the content from the fields that are enabled will be captured in Smartling. However, you will be still be able to select specific strings when Requesting Translations.

Ensure that these steps are done for each Content Model type.

If any field is not configured, it will not be captured for translation. Whenever a new content type or new field is added, you'll need to configure them under Content Parsing to make sure the content is able to be captured.


Was this article helpful?