3.1.1 • Published 10 months ago

sanity-plugin-smartling v3.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

sanity-plugin-smartling

This is a Sanity Studio v3 plugin.

Installation

npm install sanity-plugin-smartling

Usage

Add it as a plugin in sanity.config.ts (or .js):

import {defineConfig} from 'sanity'
import {smartlingPlugin} from 'sanity-plugin-smartling'

const supportedLanguages = [
  {id: 'en', title: 'English'},
  {id: 'fr', title: 'French'},
  {id: 'de', title: 'German'},
];

export default defineConfig({
  //...
  plugins: [
    smartlingPlugin({
      languages: supportedLanguages,
      defaultLanguage: 'en',
    }),
  ],
})

If you use sanity-plugin-internationalized-array then you would need to reuse language set across that and smartling plugins:

import {defineConfig} from 'sanity'
import {internationalizedArray} from 'sanity-plugin-internationalized-array'
import {smartlingPlugin} from 'sanity-plugin-smartling'

const supportedLanguages = [
  {id: 'en', title: 'English'},
  {id: 'fr', title: 'French'},
  {id: 'de', title: 'German'},
];

export default defineConfig({
  //...
  plugins: [
    internationalizedArray({
      languages: supportedLanguages,
      defaultLanguages: ['en'],
      fieldTypes: ['string'],
    }),
    smartlingPlugin({
      languages: supportedLanguages,
      defaultLanguage: 'en',
    }),
  ],
})

License

MIT © Smartling integrations team

Develop & test

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.

3.1.1

10 months ago

3.1.0

12 months ago

3.0.1

12 months ago

3.0.0

12 months ago

1.2.0

4 years ago

1.2.1

4 years ago

1.1.0

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.0.5

4 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago