Skip to content
This repository was archived by the owner on Mar 26, 2024. It is now read-only.

Support for @sanity/document-internationalization #292

@sorokin-energi

Description

@sorokin-energi

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:
image

Two options are in my mind

  1. try to support specifically this official plugin
  2. 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] },
           ...
        }  
    } 
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions