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 (WorkOS Pipes) and does not require the Studio plugin.
Prerequisites
Connect the workspace
Editors connect with OAuth only from Studio. Choose Allow on the consent screen. If the workspace already has an enabled Studio plugin connection, consent reuses it. If it has none, Hyperlocalise creates a Sanity Studio plugin personal access token and connection. Use Integrations only to rename or disable that connection. Each grant is bound to the Studio origin (for examplehttps://your-project.sanity.studio or http://localhost:3333). Hyperlocalise rejects API calls when the Origin header does not match the token.
Install the plugin in Studio
documentLocalizationSchemaTypes: document-level i18n (separate documents per locale, linked withtranslation.metadata).fieldLocalizationSchemaTypes: field-level i18n (internationalized array fields on one document).hyperlocaliseTool: bulk upload, translate, and apply for document-level types only.
Connect from Studio
- Open a document in Sanity Studio.
- Open the Hyperlocalise editor tab.
- Choose Connect Hyperlocalise and complete OAuth in the browser.
- On the consent screen, confirm the Studio origin and choose Allow.
- Select the native project.
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:
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
languagevalues and Locales collectiontagfields to the same BCP-47 tags as the native project (exact match preferred; the plugin and API treatenanden-USas 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.
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).- Pick a target locale from Translate to (document view or bulk tool). Only tags from the project locales list appear there.
- Choose Upload (locale) when the label shows your locale and the control is enabled.
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.- Pick the target locale under Translate to.
- Choose Write version when Hyperlocalise has any translation content for that locale.
- 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.
Self-hosted and local Studio
- Register your Studio origin in Hyperlocalise
SANITY_CORS_ORIGINSwhen it is not covered by defaults (http://localhost:3333, hosted*.sanity.studio). - Local Hyperlocalise (
http://localhost:3000) uses the same PKCE handoff flow as production. - Package developers can run
pnpm devinapps/sanity-studio-plugin(in-repo Studio on port 3333), or uselink-watchplus yalc to test in an external Studio.

