Package Exports
- deepl
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (deepl) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Deepl
Deepl API wrapper for node.
Installation
npm install deepl --saveDocumentation
Official documentation can be found here: https://www.deepl.com/api.html
API key
Get an account and an API key here: https://www.deepl.com/pro.html
Supported languages
"BG" "CS" "DA" "DE" "EL" "EN-GB" "EN-US" "EN" "ES" "ET" "FI" "FR" "HU" "IT" "JA" "LT" "LV" "NL" "PL" "PT-PT" "PT-BR" "PT" "RO" "RU" "SK" "SL" "SV" "ZH"
Usage
const translate = require("deepl");
translate({
text: 'I am a text',
target_lang: 'FR',
auth_key: 'authkey',
// All optional parameters available in the official documentation can be defined here as well.
})
.then(result => {
console.log(result.data);
})
.catch(error => {
console.error(error)
});Free API endpoint
translate({
free_api: true,
text: 'I am a text',
target_lang: 'FR',
auth_key: 'authkey',
})Example response
{
"translations": [
{
"detected_source_language": "EN",
"text": "Je suis un texte"
}
]
}License
MIT