yixianle / translate-api

A free google translation api, support text and page

Home Page:http://translate.hotcn.top/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

translate-api

A Node.js module for working with the Google Translation. Automatically handles bulk translations that exceed the Google Translation API query limit.

DEMO

http://translate.witbag.cn/

google translate

Npm Module

Install

  $ npm install translate-api --save

Example

  const translate = require('translate-api');

  let transUrl = 'https://nodejs.org/en/';
  translate.getPage(transUrl).then(function(htmlStr){
    console.log(htmlStr.length)
  });

  let transText = 'hello world!';
  translate.getText(transText,{to: 'zh-CN'}).then(function(text){
    console.log(text)
  });

About

A free google translation api, support text and page

http://translate.hotcn.top/


Languages

Language:JavaScript 100.0%