Never Patronize Mothers

    @kaliber/sanity-plugin-multi-language

    1.0.0 • Public • Published

    Kaliber Sanity Multi Language Plugin

    Document level translations.

    Installation

    > yarn add @kaliber/sanity-plugin-multi-language
    

    admin/sanity.json

    {
      "plugins": [
        "@kaliber/sanity-plugin-multi-language",
        ...
      ],
      ...
    }

    Usage

    admin/deskStructure.js

    import { Translations, typeHasLanguage } from '@kaliber/sanity-plugin-multi-language'
    
    export function getDefaultDocumentNode({ schemaType }) {
      return S.document().views([
        S.view.form(),
        ...(typeHasLanguage(schemaType) ? [S.view.component(Translations).title('Vertalingen')] : [])
      ])
    }

    schema/documents/pagina.js

    import { withMultipleLanguages } from '@kaliber/sanity-plugin-multi-language'
    
    export const pagina = withMultipleLanguages()({
      type: 'document',
      name: 'pagina',
      title: 'Pagina',
      fields: [
        ...
      ],
    })

    Development

    > yarn
    > yarn link
    > yarn watch
    
    admin/> yarn link @kaliber/sanity-plugin-multi-language
    

    Publish

    yarn publish
    git push
    git push --tags
    

    Install

    npm i @kaliber/sanity-plugin-multi-language

    DownloadsWeekly Downloads

    6

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    116 kB

    Total Files

    29

    Last publish

    Collaborators

    • jerryduijm
    • hjsielcken
    • rmostertkaliber
    • kaliber-owner
    • daveykropf
    • eecolor
    • pkuepers
    • larsvankleef