# General Translation Knowledge Base: How do I translate content in Sanity?
URL: https://generaltranslation.com/en-GB/kb/translate-sanity-content.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: Store each language as its own document or as a value per locale in each field, then translate the source into every target locale. General Translation's gt-sanity plugin adds a Translate action to Sanity Studio and, by default, imports each translation as a draft you review and publish.
Category: Workflow Tools
Last updated: 2026-10-21
Authors: Kevin Liu, Kevin Wu
Published: 2026-10-21

To translate content in Sanity, you store each language as a separate document tagged with a language field (document-level localisation) or as a value per locale inside each field (field-level localisation), then populate every target language from the source. It&#39;s difficult because a document is structured data: Portable Text (Sanity&#39;s rich text format) has to keep its blocks and marks; images, dates and numbers have to be copied unchanged; with one document per language, each reference has to point to the matching translation; and editors&#39; corrections to translations have to survive the next update.

## Video

The video is narrated in English, with English captions.

[How do I translate content in Sanity?](https://caxecubb9c64cezv.public.blob.vercel-storage.com/films/kb-translate-sanity-content.mp4) (47 secs)

General Translation lets you click Translate on a Sanity document with the `gt-sanity` plugin. Add `gtPlugin` to `sanity.config.ts` with your locales and document types, give the article a language field, store your API key in a private document, publish the drafts the plugin imports, and query each language by its language field.

## Ways to translate Sanity content

| Approach                                       | What it does well                                                                                        | How translations reach Sanity                                     | What it leaves to you                                                                                                                                                                      |
| ---------------------------------------------- | -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Sanity&#39;s localisation plugins alone        | Store each language as its own document or as a value per locale in each field                           | Your editors or translators type each language into Sanity Studio | Every translation, and every update when the source changes                                                                                                                                |
| Google Translate                               | Translates text you paste in, with no set-up                                                             | Copy and paste, or a script that writes through Sanity&#39;s API  | It translates each string on its own; splitting Portable Text into strings and rebuilding it, copying other fields, repointing references, consistent terminology and review are up to you |
| A script on an AI API (OpenAI API, Claude API) | Translates many documents in one scripted run, with your tone and terms in the prompt                    | A script that writes through Sanity&#39;s API                     | Splitting and rebuilding Portable Text, copying other fields, repointing references, supplying context and terms with every request, and review                                            |
| General Translation (`gt-sanity`)              | Translates text and Portable Text using the Context Groups (Glossary and Custom Prompts) on your project | A **Translate** action in Studio imports each locale as a draft   | A language field, a credentials document and a review before you publish                                                                                                                   |

Use Sanity&#39;s localisation plugins alone when translators write every language and content rarely changes; use Google Translate or an AI API script for one-off text that someone reviews before publishing. Use General Translation when documents contain rich text and references and change frequently.

## Translate documents with gt-sanity

General Translation&#39;s `gt-sanity` plugin adds a **Translate** action to Sanity Studio and supports both models, with document-level as the default `translationLevel`.

1. Install it with `npm install gt-sanity`.

2. Add a `language` field to each document type you translate.

3. Store your project ID and project API key in a private `generaltranslation.secrets` document.

4. Add `gtPlugin` to `sanity.config.ts` with your locales and document types:

   ```ts title="sanity.config.ts"
   import { defineConfig } from 'sanity';
   import { gtPlugin } from 'gt-sanity';
   export default defineConfig({
     // ... your existing config
     plugins: [
       gtPlugin({
         sourceLocale: 'en',
         locales: ['es', 'zh', 'ja'],
         translateDocuments: [{ type: 'article' }, { type: 'page' }],
       }),
     ],
   });
   ```

5. Click **Translate** on a source document.

## What a translation run does

In the default document-level set-up, **Translate** sends the document&#39;s text and Portable Text for translation, leaves images, dates, numbers and references untouched, and imports each locale as a draft. Auto-publish, reference patching (which repoints each reference to the same locale&#39;s translation) and **Save local edits** (which keeps editors&#39; changes where the source text hasn&#39;t changed) are off by default. Your frontend queries each language with a GROQ filter such as `language == "es"`. If your app also uses General Translation, assign both projects the same Context Group so that terms are translated consistently. The [Sanity Quickstart](/docs/integrations/sanity/quickstart) has the full steps.

## Related questions

- [How do I translate content in Storyblok?](https://generaltranslation.com/en-GB/kb/translate-storyblok-content.mdx): In Storyblok, add your target languages to the space and give each translatable field a value per language. General Translation's Storyblok integration fills those values from the Dashboard with Sync and apply, as drafts you review and publish in Storyblok.
- [How do I translate a Mintlify docs site?](https://generaltranslation.com/en-GB/kb/translate-mintlify-docs.mdx): Write a translated copy of every page in a folder per language and add each language to the docs.json navigation. General Translation's AI agent, Locadex, opens a pull request that adds the translated pages and per-language navigation, then translates later changes.
- [How do I translate Google Slides?](https://generaltranslation.com/en-GB/kb/translate-google-slides.mdx): Copy the deck once per language, replace the text in every text box, table cell and speaker note, and resize text that overflows. General Translation's Google Drive integration writes each language to its own copy alongside the source and runs a formatting pass to fit the new text to each slide.
- [How do I review and edit translations?](https://generaltranslation.com/en-GB/kb/review-translations.mdx): Compare each translation with its source and the other locales, and fix anything that doesn't read right. With General Translation, you edit translations on the Dashboard's Translations page and track review with labels and comments, and the next translation run by Locadex, its AI agent, brings the edits into a pull request.

## Previous and next questions

- Previous question: [How do I translate a Vue app?](https://generaltranslation.com/en-GB/kb/translate-vue-app.mdx)
- Next question: [How do I translate content in Storyblok?](https://generaltranslation.com/en-GB/kb/translate-storyblok-content.mdx)

## Sitemap

See the [Knowledge Base sitemap](https://generaltranslation.com/en-GB/kb/sitemap.md) for every article.
