Submitting & Retrieving Content

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
        image1.png
    • Media: Create the same two rules as above.
      image2.png
    • 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.
      image3.png

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.
     authorize_prompt.png

    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.
    lang_config.png
    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 (Optional)

Whenever Smartling captures content from Contentful, it parses and breaks down long pieces of text into small, discrete entities. This process makes it easier to re-order translations, whether for formatting or linguistic reasons.

Follow the steps below to identify the type of content that Smartling should expect: plain text or HTML.

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

 

  1. Go to Projects (select your Contenful project) > Project Settings > Contentful Settings
  2. In Choose Configuration, 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 field values: plain text or HTML.
  4. Click Save.

All of the content within the enabled localization fields will appear in Smartling. However, you will be able to select specific content when Requesting Translations.

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

Was this article helpful?