Sanity Connector

Setting up your Sanity Connector

Only one project in Sanity.io can be connected to Smartling. If you have multiple Sanity.io projects with documents for translation, you will need to create the same amount of Smartling projects and connect each individually.

This article will walk you through:

Connecting Sanity to Smartling

  1. Create a Sanity Connector project type in your Smartling Account
  2. From within this project, click on the gear icon > Project Settings > Sanity Settings
  3. Click Connect to Sanity
  4. Enter the API Token for  (found in Sanity.io)
    • This is the Sanity Project you want to connect to Smartling.
  5. Click Connect
  6. Choose the Sanity Project name from the dropdown (found in Sanity.io). 
    • The Sanity Project contains datasets and the language configuration schema.
  7. Choose the Sanity dataset from the dropdown (found in Sanity.io).
    • This will typically be your production dataset.
  8. Click Save

Your Sanity instance will now be connected to your Smartling project.

Sanity Connector Configuration

General

You can configure your Sanity Studio URL and the behavior of the connector when updates are made to your previously translated content.

  1. From within your Smartling Sanity Project, click on Project Settings > Sanity Settings
  2. Enter the Sanity Studio URL.
    • Smartling will use this URL as a route to link to any asset in your Sanity Studio via the App Link column in the Sanity Asset List.
  3. Click the Automation of Prior Request for Translation dropdown to select your desired behavior.
  4. Click Save

Automation of Prior Request for Translation

  • Auto: The Sanity Connector will detect changes to source content every 3 hours. Any changes detected to the source content will be submitted to Smartling for translation, batched into a Job and sit in awaiting authorization. However, if auto-authorize is enabled under Smartling Settings, the updated content will be batched into a Job and automatically authorized for translation. Smartling will not detect net new content, only updates to content that have been submitted for translation in the past.
  • Manual: The Sanity 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 Sanity Progress.
  • Disabled: The Sanity 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 

  1. From within your Smartling Sanity Project, click on Project Settings > Sanity Settings
  2. 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 Sanity target languages.
  3. Choose the correct target language from the dropdown menu to map the language in your Sanity language configuration to your Smartling project target language
  4. Click Save after mapping each of the target languages.

You cannot map a Smartling language to more than one Sanity language. 

Smartling Settings

Talk to your Customer Success Manager or Solutions Architect about options on auto-authorization and translation retrieval.

If you choose to integrate a JS library or other visual context tools, consult your Customer Success Manager or Solutions Architect to ensure the default context functionality is disabled. It is enabled by default for the standard visual context.

 

Was this article helpful?