Sanity and threefold: localise documents into a market's variant
A Sanity Studio plugin that translates a document into a market's language variant, shows the QA report and saves the result as a draft. It never publishes. Built, not yet on npm.
On this page
The threefold plugin for Sanity Studio translates a source document into a market's variant (es-MX, pt-BR, de-AT) with threefold's page localisation call, shows the QA report for each document, and saves the result as a draft. It never publishes.
Status today
Built in the threefold repository. It is not published to npm and has not been run against a live Studio. Until it is published, the way in is the call it makes: POST /api/pages/localise (page localisation).
What it adds to Studio
- A Localise with threefold document action on the document types you list.
- A Localise tool for bulk runs: pick documents, translate, review each QA report, then save drafts.
What is sent, and what is not
Only string fields, text fields and Portable Text span text go to threefold, as numbered nodes with no field names or document ids. References, images, files, slugs (unless you opt in), URLs, emails, dates, numbers, booleans, code blocks, colours and fields with a fixed list of options stay in the Studio and are copied back unchanged. Portable Text link targets stay put. A translation that loses or invents a formatting tag keeps the source block instead. You can exclude more by field or by type.
Before you translate: check the site
The localised pages need hreflang and a language on each page. The hreflang auditor reads a public page and lists what is missing, and the llms.txt grader grades the file agents read.
Questions
Does it publish for me?
No. It saves drafts. You publish in Studio.
Is my content stored by threefold?
The call is stateless: results are not stored. The model supplier sees the text, as the page-localisation document describes.