The Contentful integration lets you synchronize your content and completed translations between Contentful and Transifex. Use this integration so that your localization team can leverage most of Transifex's services while translating your Contentful space.
Configuring contentful space
The Contentful space must be configured to support multiple languages and enable localization. By default, your Contentful space only supports one language. You have to configure it to support additional languages.
To enable additional locales, you will need to log into your Contentful space, then:
In the Select a locale field, select the required locale from the drop-down menu.
When satisfied, click the Save button. Your locale will be added to your space.
Enable fields for locales
Once locales are added to your space, the next step is to enable them for fields.
To enable locales for fields:
Login to your Contentful space and go to the Content model tab.
Go to the required content type and open it. The content type editor is displayed.
Click Settings for each field you will localize.
Under the "Settings" tab, select the Enable localization of this field checkbox under the "Field options" area.
Click Confirm to save changes.
Click Save to apply changes to the content type.
Installing Contentful integration
Follow the steps described below to connect your Contentful and Transifex accounts:
Navigate to “https://app.transifex.com/“
Log in to your Transifex account. This will take you to the Transifex Dashboard.
Go to your project Settings > Integrations > Contentful> Install
You will be redirected to the integration’s authorization page, where:
First, it is necessary to grant permission for the integration to perform modifications in Transifex on your behalf.
Next, it is required to authorize the integration in your Contentful account. To do this, select the Authorize button and log into your Contentful account (if you haven't already done so).
Click on Authorize Transifex Integration.
Click again on the Authorize button. You are now ready to link a space.
Linking a Transifex project with a Contentful space
Click on the Link your space button. On the wizard's first step, select the Contentful space to sync with the project.
Click Next to choose the Contentful content you want to sync with Transifex.
You can view localizable content and search across Entries in the wizard interface shown.
An Entry may or may not contain one or more Assets.
Their number will be listed next to each Entry for information purposes.
When you identify Contentful content you want to sync with your Transifex project, mark it by checking the box on the left of the Entry title.
Any selections you have made are persistent, so you can keep searching and navigating on the displayed content list without losing your selections.
You can learn more about the functionality of this wizard’s step by checking the respective section to Choose content for translation below.
When you are done selecting your content, click Next to move to the final step of the setup wizard. This is where you will define how the syncing between Transifex and Contentful will happen.
When you finish this setup step, click the Save & Sync button to sync content from Contentful to Transifex.
Choosing content for Translation
In this subsection, we are expanding on the full functionality provided in the content selection step of the wizard.
In this step, you will see information about Contentful content found in the space you have linked to the specific Transifex project.
For each Entry in the list, you can see some additional information depending on the sync status for that content:
The title of the Entry. If there is no title, “Untitled” is used instead.
Checked if the content is selected to sync between Contentful and Transifex; unchecked otherwise.
The Content-Type that each Entry is based on
The space environment that the Entry was found in
The number of Assets contained in the respective Entry
The content status in Contentful (draft, published, archived).
If already published content is changed in Contentful, its status will be “draft” in the integration.
A Last Contentful update field holding the date of the last update of the content in Contentful
To filter the content displayed in the list, choose the drop-down to select the content type and type in the search box:
Filtering is available for Entries only.
The content list can be filtered by pressing either the Enter key or the Search button.
Search will look in the title and content for Entries.
You can use double quotes around the search terms to make searching more focused.
To clear out a search term, delete it and press the Enter key or Search button (alternatively, you can use the X icon in the search area.)
Items in the list have pagination.
You can change the page size using the drop-down displayed under the content list and navigate through the different pages using the left and right arrows located in the same area under the content list.
Pushing localized content options
Syncing localized content back to Contentful can work automatically per Entry in each target language. The integration offers three possible options for automatically sending localized content back to Contentful:
100% translated or updated (for 100% translated)
100% reviewed or updated (for 100% reviewed)
100% proofread or updated (for 100% proofread)
Depending on the setting selection, this will apply to individual Entries as they are localized in each target language. For example, once an Entry is fully translated into French, the French entry will be sent to Contentful. If the Chinese translation of the article is not fully translated, it will not be sent to Contentful.
All the sync options are triggered when the language reaches 100%. This means that if, for example, an already reviewed language is edited, the updated reviewed translation will be sent to Contentful automatically.
Translating content in Transifex
Each Entry synced from Contentful to Transifex will create a resource following the Contentful title name.
For example, if you have two blog entries in Contentful titled “What I’ve learned so far” and “Few tips for installing the app”, syncing them to Transifex via the integration, you will get two resources with the same names:
“What I’ve learned so far”
“Few tips for installing the app”
If the Entry has no title, the resource name is constructed using the prefix CTF_entry_ followed by the Entry ID. The resource slug is always the Entry ID, preceded by the same prefix.
Once your content is inside Transifex, you can start translating it or manage the localization process as appropriate.
Syncing content from Contentful to Transifex
Syncing content from Contentful to Transifex happens upon saving or updating the integration settings in the integration’s UI (Project Settings → Integrations → Contentful → Manage).
When a syncing process is initiated, you will be able to see that syncing is in progress in the activity log. This process could take some time, depending on the number and size of the syncing files.
If you want to add new content for synchronization or remove existing content, click Manage Content in the project integration’s UI to show the Integration Wizard and check all the new content you want to sync. Then click the Save & Sync button to start a new sync process.
Syncing manually content from Transifex to Contentful
There is an option to send localized content to Contentful manually without waiting for a resource to be 100% translated or reviewed (Project Settings → Integrations → Contentful → Manage → (ellipsis) Manual Sync).
By clicking on Manual Sync, a modal will appear requesting the threshold localization percentage that Transifex will check on all your project's resources.
All target languages localized above that threshold will be synced with Contentful using the Sync content options you have set up for the integration. For example, suppose you had set up Contentful to sync 100% translated resources. In that case, the manual process will identify all target languages whose translation percentage is equal to or above the threshold percentage you set on the modal and sync all content back to Contentful.
Editing synchronization settings
As your project evolves, you may end up wanting to change the workflow of pushing localized content back on Contentful.
To edit your options:
Navigate to the Project’s settings -> integrations tab.
Click on the Manage link under the Contentful section to load the integration’s UI
Click on the ellipsis and select Edit Settings.
To check the synchronization results, either from Transifex to Contentful or from Contentful to Transifex, you must load the integration’s UI, where all events that happened are logged in chronological order (the most recent ones appear first).
These logs allow you to identify any potential issues with particular Entries that failed to sync or contained Assets with no localizable content. Go to your project settings > integrations tab, and click on the Manage link under the Contentful section to load the integration’s UI.
Uninstalling the Contentful integration
To uninstall the Contentful integration from your project, you have to follow the steps below:
Go to your project settings > integrations, click on the ellipsis, and select Remove integration.
Click on Remove to confirm the action.
Looking for more help? Get support from our Transifex Community Forum!
Find answers or post to get help from Transifex Support and our Community.