DeepL provides industry-leading machine translation with excellent quality for European languages. The free tier includes 500,000 characters per month.
To use DeepL as your translation provider, add your API key to the global configuration:
return [
'johannschopplich.content-translator' => [
'DeepL' => [
'apiKey' => env('DEEPL_API_KEY')
]
]
];
DeepL offers a variety of options to customize the text translation API endpoint. To learn more about the available options, please refer to the DeepL translate text parameters.
To set custom request options for the DeepL API, add them to the plugin's requestOptions configuration:
return [
'johannschopplich.content-translator' => [
'DeepL' => [
// All available options can be found in the DeepL API documentation:
// https://developers.deepl.com/docs/api-reference/translate#request-body-descriptions
'requestOptions' => [
// Lean towards formal language
'formality' => 'more'
]
]
]
];
DeepL supports the following languages for translation:
Arabic (AR), Bulgarian (BG), Chinese (ZH), Czech (CS), Danish (DA), Dutch (NL), English (EN), Estonian (ET), Finnish (FI), French (FR), German (DE), Greek (EL), Hebrew (HE), Hungarian (HU), Indonesian (ID), Italian (IT), Japanese (JA), Korean (KO), Latvian (LV), Lithuanian (LT), Norwegian Bokmål (NB), Polish (PL), Portuguese (PT), Romanian (RO), Russian (RU), Slovak (SK), Slovenian (SL), Spanish (ES), Swedish (SV), Thai (TH), Turkish (TR), Ukrainian (UK), Vietnamese (VI)
All source languages plus regional variants:
LC_ALL locale setting. For example, if your locale is en_GB, DeepL will receive EN-GB as the target language.