You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sanity document internationalization plugin has a newer version and is available along with sanity package.
Since this upgrade requires migration, consider changing the value of language field to have iso name. For example en-GB instead of en_GB, to avoid complexity with locale in the web. This below language configuration can be removed for each language, and the Intl namespace from Javascript can be used to get the title, locale etc. The reason why we could not use Intl is because of en_GB which is not a standard to describe a language.
Allowing one to create the metadata document, without creating a duplicate translated version. Useful in cases where we have to link already existing documents.
// Enable "manage translations" button without creating a translated version. Helpful if you have
// pre-existing documents that you need to tie together through the metadata document
allowCreateMetaDoc: true, // defaults to false
Hide the language button on top of document. Useful with poland site as the button is of no use for a site with single langauge.
// Hides the language filter (Translations button) in the document editor toolbar.
// The language badge will still be shown. Accepts:
// - A boolean to hide for all types: `hideLanguageFilter: true`
// - An array of schema type names: `hideLanguageFilter: ['lesson']`
// - A function for dynamic control: `hideLanguageFilter: (ctx) => ctx.schemaType === 'lesson'`
hideLanguageFilter: true, // defaults to false
}
Duplicate with translations action, to duplicate a version along with its translated versions.
Options to exclude fields from getting copied to the translated version. When creating a norwegian news from a published english news, we can potentially exclude the firstPublishedAt, lastModifiedAt and send to subscribers values from the english versions.
Sanity document internationalization plugin has a newer version and is available along with sanity package.
en-GBinstead ofen_GB, to avoid complexity with locale in the web. This below language configuration can be removed for each language, and theIntlnamespace from Javascript can be used to get the title, locale etc. The reason why we could not useIntlis because ofen_GBwhich is not a standard to describe a language.It has some useful features like