Hi,
@sanity/document-internationalization can add __i18n_lang, __i18n_refs and __i18n_base fields to schemas with i18n flag.
But it's also possible to use custom names on both global or schema level:

Two options are in my mind
- try to support specifically this official plugin
- try to support dynamic type extension (for instance with codegen option and something similar to openapi spec syntax)
Like
const type = defineType({
name: 'myType'
i18n: true,
codegen: {
extend: {
__i18n_lang: { type: [String] },
...
}
}
})
Hi,
@sanity/document-internationalizationcan add__i18n_lang,__i18n_refsand__i18n_basefields to schemas withi18nflag.But it's also possible to use custom names on both global or schema level:

Two options are in my mind
Like