Please note that this Connector is a paid product. For pricing information, please reach out to your Smartling Customer Success Manager.
It is important to ensure that languages selected in your Contentstack instance are the same as languages configured in your Contentstack project in Smartling.
Set up Languages in Contentstack
- Log into your Contentstack account.
- Click the gear icon and select Languages from the dropdown.
- Add Languages.
- Click the add New Language button and choose your target languages.
Connecting Contentstack to Smartling
- Create a Contentstack Connector project type in your Smartling Account.
- Ensure all required target languages are added to the project
- From within this project, click on the Settings tab > Contentstack Settings
- Click Connect To Contentstack and choose the region where your datacenters are located
-
Log into Contentstack
- We recommend creating a dedicated user role for the Connector to ensure no disruption to your localization process, should an email address become deactivated for any reason
- Choose the Stack your content is in
- This is the stack the Contentstack Connector and Smartling App integrate with
- Select the source locale of the content
- This should match with the source locale of the Smartling project
- Your Contentstack is connected to Smartling.
- The Organization UID and API key are automatically generated based on the credentials provided above.
Contentstack Connector Configuration
General
You can configure the behavior of the connector when updates are made to your previously translated content.
- From within your Smartling Contentstack Project, click on Project Settings > Contentstack Settings.
- Click the Automation of Prior Request for Translation dropdown to select your desired behavior.
- Click Save.
Automation of Prior Request for Translation
- Auto: The Contentstack Connector will detect changes to previously submitted source content every three hours. Any detected updates are batched into a Job and sit in awaiting authorization. However, if auto-authorize is enabled under Smartling Settings, the updated content is automatically authorized for translation. This feature does not detect content in new assets, only updates to content from assets previously submitted for translation. In other words, if an asset is brand new and has never been requested for translation, its content will not be picked up by this automation. See additional details here.
- Manual: The Contentstack Connector will detect changes to source content every 3 hours, but will not submit new content for translation. Changed content will be indicated by a checkmark in the Outdated column in the Contentstack Progress section.
- Disabled: The Contentstack Connector will not detect changes to source content or automatically submit new changes.
3 hours is the recommended shortest time duration between checks. Talk to your Solutions Architect about changing the frequency to longer wave periods using cron.
Language Configuration
- From within your Smartling Contentstack Project, click on Project Settings > Contentstack Settings.
- In the Language Configuration section, you will see the number of target languages in your Smartling project, along with the source language in your Smartling project. These details should match dropdown menus with your Contentstack target languages.
- Choose the correct target language from the dropdown menu to map the language in your Contentstack language configuration to your Smartling project target language.
- Click Save after mapping each of the target languages.
You cannot map a Smartling language to more than one Contentstack language.
Configure Content Parsing
When Smartling captures content from Contentstack it 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.
| Parsing Option | Description |
| Do not translate | Use this if the field shouldn't be translated using 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 |
- From your Contentstack project, click the Settings tab
- Click Contentstack Settings
- Under Content Parsing, Entries is the default content selection. Click each field to expand and choose your preferred parsing option
- Click Save
Custom JSON Parsing
This allows you to translate custom JSON fields from Contentstack by specifying the path to the field in Contentstack, and setting a parsing option. By default, the connector treats a Custom JSON field as opaque: it does not extract any values inside the field for translation until you add a mapping.
To find the path, you need to export an entry that contains the custom field. The JSON that is exported will provide the full path to the field.
Example Custom Field JSON
{
"_version": 2,
"locale": "en-us",
"uid": "blt5e94dd22b908fc13",
"_in_progress": false,
"created_at": "2023-05-31T17:29:17.569Z",
"created_by": "blt587eec7a22402e70",
"json_custom": {
"value": [
{
"key": "CarColor",
"value": "Red"
}
]
},
"tags": [],
"title": "Car json custom field",
"updated_at": "2023-05-31T17:29:24.424Z",
"updated_by": "blt587eec7a22402e70"
}- To define a custom field for translation, click Add New Field
- Under Field Path (Contentstack), insert the path as seen in the JSON of the custom field. From the above example, the path would be inserted as,
/*/json_custom/value/red - Choose a parsing type from one of the options, HTML, Markdown, Plain text
- You also have the option to include a description for your own reference
Mapping repeating content (arrays) with wildcards
Some custom JSON fields contain repeating structures instead of a single value, for example the rows of a table, or a list of items. Use an asterisk (*) as a wildcard to match every property with a given name across all elements of an array, instead of writing a separate mapping for each one.
- Array iteration itself is automatic. You don't need a wildcard just because a field is inside an array, the connector already goes through each array element.
- Use the wildcard when the property name varies or repeats across elements, for example one property per column in a row, where you'd otherwise need one mapping per column.
- A wildcard matches named JSON keys only. It doesn't replace the automatic step that goes through the array.
- A path doesn't have to start from the root of the entry. A shorter path such as
/tableState/data/*matches that structure wherever it occurs, regardless of which group field it's nested under.
Example: translating a Contentstack Table extension
The Contentstack Table extension (and similar table-style custom fields) stores its content as a Custom JSON field, so its cell content is not translated by default, only mapped paths are. A typical table field structure looks like tableState.columns (headers) and tableState.data (rows), with each row containing one property per column.
To translate a two-column table nested under a group field called entry_content:
| Content | Field Path (Contentstack) | Parse Type (Contentstack) |
| Column headers (optional, only needed if headers require translation) | /entry_content/table_cstk/jsonValue/tableState/columns/label | Plain text |
| All cell values, any number of columns | /entry_content/table_cstk/jsonValue/tableState/data/* | Plain text |
The data/* mapping matches every column property (column1, column2, and so on) in every row with a single entry. If you'd rather map columns individually, you can instead add one path per column (.../data/column1, .../data/column2), but the wildcard is recommended when a table has many columns or column names aren't fixed.
If your table or list field is nested under a different group field, you have two options. You can write the full path from the root of the entry, including every parent field in order, the same way entry_content appears above. Or you can write a shorter, relative path starting from the table field itself (for example /tableState/data/*), which matches that structure regardless of its parent path. The full path is safer if the same field name could appear in more than one place in your entry; the relative path is quicker to write when it's unambiguous. If you're not sure of your exact structure, export the entry (as described above) to confirm it before mapping.
After adding or updating a mapping, resubmit the affected entries so the connector picks up the new mapping.
Workflow Name Mapping
This setting allows you to define the Contentstack workflow stage where translation requests are automatically initiated, and upon receiving translations, the connector automatically updates the workflow stage to the desired next step.
Smartling Settings
Talk to your Customer Success Manager or Solutions Architect about options on auto-authorization and translation retrieval.