Install this package via npm.
npm install deepltranslate
- import the package and create a new object by passing token
let deeplApi = require("deepltranslate")
let deeplTranslation = new deeplApi({token: 'this is token'})
- default hostname is 'api.deepl.com' and you can also pass hostname like this :
let deeplTranslation = new deeplApi({token: 'this is token', hostname: 'this is hostname'})
deeplTranslation.translate("hello", "en", "ja").then((res)=>{
console.log(res);
})
deeplTranslation.getLanguages().then((res)=>{
console.log(res);
})
If you discover any security related issues, please email them to waithawoocw@gmail.com instead of using the issue tracker.
The MIT License (MIT). Please see the License File for more information.