How to add localized blockContent fields in Sanity schema?

9 replies
Last updated: Jan 28, 2026
Hello 👋 I’m a total newbie to Sanity and am currently trying it out for a few hours with the Nextjs Blog starter .

I would like to add a localized
blockContent
in the
post.js
schema,
so that users can add body text in two languages.
I successfully localized the title, but can’t do so for the body. After reading about it, I thought duplicating the body field element would be a simple solution


    {
      name: "body",
      title: "English body",
      type: "blockContent",
    },
    {
      name: "body_de",
      title: "German body",
      type: "blockContent",
    },
and then in
[slug.js]
using a ternary to pass the respective version into the boilerplate component

<PostBody _content_={lang === "de" ? post.body : post.body_tr} />

However, the
body_de
content does not make it into the post payload.

What would be the easiest solution do the above? It doesn’t have to be fancy at all, the resulting site will be most simple.
Thanks a lot for any suggestions!
🙏
AI Update

Good news - your approach of duplicating the field is actually a perfectly valid solution for simple localization! The issue you're experiencing where body_de doesn't appear in your post payload is almost certainly a GROQ query problem, not a schema problem.

When you query documents in Sanity, you need to explicitly request the fields you want. The Next.js blog starter likely has a GROQ query that fetches post data, and it's probably only requesting the original body field.

Here's what you need to do:

1. Find your GROQ query

Look in your Next.js project for where posts are being fetched. In the blog starter, this is typically in a lib or sanity folder, often in files like queries.js, queries.ts, or directly in your [slug].js page. You're looking for something like:

*[_type == "post" && slug.current == $slug][0] {
  title,
  body,
  slug,
  // ... other fields
}

2. Add your new field to the projection

Simply add body_de to the list of fields being requested:

*[_type == "post" && slug.current == $slug][0] {
  title,
  body,
  body_de,  // Add this line
  slug,
  // ... other fields
}

3. Make sure you're using the correct field name in your component

I noticed in your example you wrote:

<PostBody content={lang === "de" ? post.body : post.body_tr} />

But you defined the field as body_de, not body_tr. Make sure these match:

<PostBody content={lang === "de" ? post.body_de : post.body} />

This field-level approach is a totally reasonable solution for simple sites, especially when you're just starting out. If you later need more sophisticated localization (many languages, translation workflows, etc.), you can explore document-level localization or the official internationalization plugins, but for a two-language site, your approach is perfectly fine!

Show original thread
9 replies

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Was this answer helpful?