spins up a puppeteer instance (with mega-scraper) and translates any text for free using google translate, headlessly, with a free random proxy (using get-free-https-proxy)
npm i -g free-google-translate-with-puppeteer
free-google-translate-with-puppeteer --text 'hello how are you' --to 'de'
the text to translate
translate given text to the following language
translate given text from given language
npx free-google-translate-with-puppeteer --text 'hello how are you' --to 'de'
npm i free-google-translate-with-puppeteer
see example.js
const translate = require('free-google-translate-with-puppeteer')
translate({ text: 'ein apfel am tag hält den arzt fern', from: 'it', to: 'en' })
.then(translation => {
console.log(`-> "${translation}"`) // one apple a day keeps the doctor away
})