-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Translatable string list option #24
Comments
Use the same method described in this section // listType.ts
import { defineType } from "sanity";
export const listType = defineType({
name: 'list',
type: 'string',
options: {list: ['one', 'two', 'three']},
}) Register that to your schema types in Then add the custom type to your plugin config: internationalizedArray({
// ...other settings
fieldTypes: ['list']
}) ![]() |
@SimeonGriggs but that means we get English choices only even for the other languages. With this, what's going to happen is only being able to choose a different choice per language, not the actual content being translated. |
Got it. In that instance, perhaps rethink the content model. If you need "the same value, but in different languages," perhaps the field only needs to be set once, and your consuming applications display the right language value. Instead of having the same value set in different languages, independently in separate fields. |
Hmm, yes, that would be an alternative approach. Not quite the same experience with the other translatable resources but we could try that if there's no built-in solution. Thanks |
I may be missing something, but is there a solution for string list option to be translatable?
The text was updated successfully, but these errors were encountered: