DeepL
DeepL provider for Translate Plugin
DeepL provider for Strapi Translate Plugin
Configure the provider through the pluginOptions:
1module.exports = {
2 // ...
3 translate: {
4 enabled: true,
5 config: {
6 // Choose one of the available providers
7 provider: 'deepl',
8 // Pass credentials and other options to the provider
9 providerOptions: {
10 // your API key - required and wil cause errors if not provided
11 apiKey: 'key',
12 // use custom api url - optional
13 apiUrl: 'https://api-free.deepl.com',
14 // use custom locale mapping (for example 'en' locale is deprecated so need to choose between 'EN-GB' and 'EN-US')
15 localeMap: {
16 // use uppercase here!
17 EN: 'EN-US',
18 },
19 // Optional: Pass glossaries on translation. The correct glossary for each translation is selected by the target_lang and source_lang properties
20 glossaries: [
21 {
22 id: "your-glossary-id",
23 target_lang: "DE",
24 source_lang: "EN",
25 }
26 ],
27 apiOptions: {
28 // see <https://github.com/DeepLcom/deepl-node#text-translation-options> for supported options.
29 // note that tagHandling Mode and glossary cannot be set this way.
30 // use with caution, as non-default values may break translation of markdown
31 formality: 'default',
32 // ...
33 },
34 },
35 // other options ...
36 },
37 },
38 // ...
39}
or use the default environment variables:
DEEPL_API_KEY
- defaultundefined
DEEPL_API_URL
- defaultundefined
To get an API key, register for free at www.deepl.com/pro#developer.
Limitations:
- Only the deepl supported languages can be translated
- The API-Limits of DeepL (size, number of fields) and too many requests should be respected. If one field is larger than the request size limit, the content needs to be split and merged at some character, which may break the content layout!
Install now
npm install strapi-provider-translate-deepl
Create your own plugin
Check out the available plugin resources that will help you to develop your plugin or provider and get it listed on the marketplace.