Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
@sanity/document-internationalization
Advanced tools
Provides document level translations for Sanity Studio
This is a Sanity Studio v3 plugin. For the v2 version, please refer to the v2-branch.
There are two popular methods of internationalization in Sanity Studio:
_id
This plugin adds features to the Studio to improve handling document-level translations.
For field-level translations you should use the @sanity/language-filter plugin.
An example of document-level translation could be a lesson
schema, the title
, slug
and content
fields would be unique in every language.
A good use of field-level translation could be a person
schema. It could have the same name
and image
in every language, but only the biography
would need translating.
From the same directory as the Studio run:
npm install --save @sanity/document-internationalization
or
yarn add @sanity/document-internationalization
The plugin is now installed, but you will need to complete the following steps to see the Document Translation UI:
While most of the UI is the same in the official version of this plugin there are some breaking changes you should be aware of before migrating:
Coming from sanity-plugin-intl-input
MIT-licensed. See LICENSE.
This plugin uses @sanity/plugin-kit with default configuration for build & watch scripts.
See Testing a plugin in Sanity Studio on how to run this plugin with hotreload in the studio.
Run "CI & Release" workflow. Make sure to select the main branch and check "Release new version".
Semantic release will only release on configured branches, so it is safe to run release on any branch.
FAQs
Create unique translations of a document based on its language, joined by a shared reference document.
The npm package @sanity/document-internationalization receives a total of 11,711 weekly downloads. As such, @sanity/document-internationalization popularity was classified as popular.
We found that @sanity/document-internationalization demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 56 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.