@six-socks-studio/sanity-plugin-intl-input
v5.2.4
Published
[![npm version](https://img.shields.io/npm/v/@six-socks-studio/sanity-plugin-intl-input.svg?style=flat)](https://www.npmjs.com/package/@six-socks-studio/sanity-plugin-intl-input)
Downloads
10
Readme
Intl plugin for Sanity
!! Breaking Change for V5
The ID structure for translated documents has changed. Your queries against Sanity will continue to work until you use the maintenance tab (new in V5) to update the ID structure.
The change was made to improve the querying structure and to make better use of GROQ. The new structure looks as follows i18n.{baselanguage-document-id}.{language}
. This means you could query all translations for a document as follows *[_id in path("i18n.{baselanguage-document-id}.*")]
. This vastly improves the querying experience.
Default solution
When you want to create translations in Sanity they suggest following approach.
This definitely works, but makes the UI very clunky as you get more fields that require translations.
With intl-plugin
With the intl plugin you will get a cleaner UI for creating translatable documents as the translation is managed across multiple fields and it is even possible to manage document wide translations.
| Simple translated object field | Document wide translation | |-|-| |||