Skip to content

Use Translation ​

A free translation service has been built-in which using unoffical APIs of Google and Microsoft. We do not guarantee its high availability.

If you need more stable and large-scale translation service, please buy and integrate other paid APIs in custom script.

Translate specific text in script ​

jiant.parse.translate(value, fromLang, toLang, provider) ​

ParamTypeRequiredDescription
valuestring✅Plain text or HTML text to translate.
fromLangstring❌Language code of origin content. If empty, it will be auto detected.
toLangstring✅Destination language code for translation.
providerstring❌Translation service provider: GOOGLE / MICROSOFT
js
const result = await jiant.parse.translate('兼听则明', 'zh', 'en', 'GOOGLE')

console.log(result) // output: 'To listen to all sides makes one wise'

Translate all feed items ​

If you want to translate all parsed feed items to your language, there is an easy way with configure setting:

Set translate in customParams of task configure(JSON). Go to Configure Reference.