Skip to main content
Sanity does not translate. Hyperlocalise jobs do. Create a Sanity Studio plugin workspace connection, install sanity-plugin-hyperlocalise, then use the Hyperlocalise editor view or bulk tool to pick a native project, upload text, run translation jobs, and apply completed locales back into Studio. Jobs use the project’s source locale and target locales. en is not en-US. zh-CN is not zh-TW. For batch import and Push to Sanity from the Content editor, use Localize Sanity documents (automation) instead. That path uses a separate Sanity integration row and does not require the Studio plugin.

Prerequisites

Connect the workspace

Editors connect by pasting a Hyperlocalise API key into Studio. The first time a key is used, Hyperlocalise creates a Sanity Studio plugin connection for it. Use Integrations to rename or disable that connection. The plugin acts with the access of the person who created the key. It sees the native projects that person can see. If they leave the workspace, create a new key and paste it into Studio again. The key is saved in each editor’s browser for that Sanity project and dataset. It is never written to your Sanity dataset. Revoke the key under Settings → API keys to disconnect every Studio that uses it.

Install the plugin in Studio

  • documentLocalizationSchemaTypes: document-level i18n (separate documents per locale, linked with translation.metadata).
  • fieldLocalizationSchemaTypes: field-level i18n (internationalized array fields on one document).
  • hyperlocaliseTool: bulk upload, translate, and apply for document-level types only.
A schema type cannot be listed in both arrays.

Connect from Studio

  1. Open a document in Sanity Studio.
  2. Open the Hyperlocalise editor tab.
  3. Paste your Hyperlocalise API key and choose Connect Hyperlocalise.
  4. Select the native project.
The Hyperlocalise top-level tool asks for a key the same way. Use Change API key on the project screen to switch keys.

Project locales list

After you connect, the plugin loads each accessible native project from the Hyperlocalise session API (GET /api/integrations/sanity/session). Every project in that response includes a source locale and a target locales list—the same values you configure under Settings → Locales for that project. See Manage project languages. Example session fragment for one project:
Translate to (document view and bulk tool) only offer tags from that project’s targetLocales. If you configure supportedLanguages in sanity.config, the plugin shows the intersection: a language must appear in both supportedLanguages and the project’s targetLocales. When supportedLanguages is omitted, the plugin lists every project target locale. Use locale tags from this list everywhere:
  • Pick targets in the plugin only from the dropdown or checkboxes (do not type ad hoc tags in Studio-only config).
  • Set Sanity document language values and Locales collection tag fields to the same BCP-47 tags as the native project (exact match preferred; the plugin and API treat en and en-US as different tags).
  • After you add or remove targets in Hyperlocalise, reconnect or use Change on the project line so the plugin reloads the session list.
Upload and Write version labels reflect the selected locale (for example Upload (fr-FR) and Write fr-FR version) only when that tag is a project target and, when configured, listed in supportedLanguages.

Upload target locale text

Upload (locale) imports existing Sanity content for the selected target locale into Hyperlocalise as translations for the collected source file. It is enabled when that locale already exists in Studio (a linked translation document for document-level i18n, or field-level content for the locale).
  1. Pick a target locale from Translate to (document view or bulk tool). Only tags from the project locales list appear there.
  2. Choose Upload (locale) when the label shows your locale and the control is enabled.
If the source document is not in Hyperlocalise yet, Upload collects the source first, then imports the target strings. Each source document is stored at sanity-plugin/{sanityProjectId}/{dataset}/{documentType}/…json. Segments use stamped keys sanity.k.* in the JSON file (same key format as automation imports, which use the sanity/ path prefix).

Translate

Translate starts an agent job for the locale selected under Translate to, then writes that locale into Sanity when generation finishes. Approval is not required. Draft or review-ready strings are enough.
  • If the source is not collected yet, Translate sends source segments on the first run (same as before).
  • When the job reaches waiting for review or succeeded, Hyperlocalise writes the Sanity locale draft automatically.
  • You can still review strings in the Content Editor; that review is optional for Studio write-back.

Write locale version in Studio

Write version (for example Write fr-FR version) writes Hyperlocalise translations back into Sanity as a draft for that locale without starting a new job. If a locale document already exists, the same action overwrites that linked draft. Approval is not required.
  1. Pick the target locale under Translate to.
  2. Choose Write version when Hyperlocalise has any translation content for that locale.
Behavior depends on i18n mode:
  • Field-level: Hyperlocalise patches the open document draft with the target locale slot on internationalized fields.
  • Document-level: Hyperlocalise writes a draft translation document and links it through translation.metadata, or overwrites the existing linked draft for that locale.
Writing a locale version does not publish in Sanity. Publish from Studio after you review drafts.

Self-hosted and local Studio

  • Studios on any domain can connect, including self-hosted Studios on your own domain. You don’t need to register the domain with Hyperlocalise.
  • The plugin connects to https://www.hyperlocalise.com. For a local or self-hosted Hyperlocalise, set SANITY_STUDIO_HYPERLOCALISE_APP_URL in your Studio environment and use a key created in that instance.
  • Package developers can run pnpm dev in apps/sanity-studio-plugin (in-repo Studio on port 3333), or use link-watch plus yalc to test in an external Studio.

Change or remove access

Revoke the API key under Settings → API keys, or disable its connection under Integrations, when Studio should stop reaching this workspace. See Connection troubleshooting if connecting or apply fails.