
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeYou're not missing anything – you're actually asking a great question! The archived sanity-template-translation-examples repository demonstrates two main localization approaches but doesn't explicitly handle translated slugs in the examples. This is actually intentional, and here's why:
For Document-Level Translations: When using the @sanity/document-internationalization plugin, each language version is a separate document. This means each document can (and should) have its own unique slug field. The template doesn't need special handling because the slug is just another field on the document – it's naturally independent per language version.
For Field-Level Translations: When using field-level translation (objects or arrays), slugs typically aren't translated because:
/en/article vs /es/article) rather than translating the slug itselfWith @sanity/document-internationalization:
Just add a regular slug field to your schema – each language document gets its own slug automatically. The Sanity docs on localization show this pattern in the "post" example schema, where the slug field exists on each translated document.
With field-level translations (using internationalized-array): You can make the slug field internationalized just like any other field. However, you'll need to handle uniqueness validation yourself, as Sanity's built-in slug uniqueness validation doesn't work across internationalized arrays.
The Sanity documentation recommends:
The template focuses on the core localization patterns, leaving routing and URL structure decisions to your specific front-end implementation. It's not an oversight – it's acknowledging that slug translation requirements vary significantly between projects, and most implementations handle this through routing strategy rather than translated slug fields.
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.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store