1.0.12 • Published 11 months ago

strapi-provider-translate-libretranslate v1.0.12

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

LibreTranslate provider for Strapi Translate Plugin

Configure the provider through the providerOptions:

module.exports = {
  // ...
  translate: {
    enabled: true,
    config: {
      // Choose one of the available providers
      provider: 'libretranslate',
      // Pass credentials and other options to the provider
      providerOptions: {
        // your API key - required and wil cause errors if not provided
        apiKey: 'key',
        // api url - required
        apiUrl: 'https://your.libretranslate.instance',
        // maximum number of requests per minute - optional, default is `undefined` => no limit
        apiMaxRPM: 60,
        // maximum number of chars per request - optional, default is `undefined` => no limit
        apiMaxChars: 1234,
        // maximum number of texts per request
        apiMaxTexts: 55,
        // manually overwrite the Strapi Locale to LibreTranslate Locale mapping.
        // default is the string before the `-` character for every locale
        localeMap: {
          'en-US': 'de',
        },
      },
      // other options ...
    },
  },
  // ...
}

or use the default environment variables:

  • LT_API_KEY - default undefined
  • LT_API_URL - default undefined
  • LT_API_MAX_RPM - default undefined
  • LT_API_MAX_CHARS - default undefined
  • LT_API_MAX_TEXTS - default undefined

Note that environment variables take precedence over values providerOptions. To force no limit on requests per second or maximum characters, set them to -1

Limitations:

1.0.12-next.1

11 months ago

1.0.12

11 months ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.3-next.1

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago