sanity-plugin-smartling
TypeScript icon, indicating that this package has built-in type declarations

3.1.0 • Public • Published

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.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
3.1.05latest

Version History

VersionDownloads (Last 7 Days)Published
3.1.05
3.0.15
3.0.02
1.2.10
1.2.00
1.1.00
1.0.40
1.0.30
1.0.10
1.0.00
0.0.50
0.0.41
0.0.30
0.0.20

Package Sidebar

Install

npm i sanity-plugin-smartling

Weekly Downloads

13

Version

3.1.0

License

MIT

Unpacked Size

11.3 MB

Total Files

15

Last publish

Collaborators

  • connectors-team