Skip to content

nodejsLovers/translate-api

This branch is 6 commits behind yixianle/translate-api:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
lele
Apr 8, 2017
ebdbcbf · Apr 8, 2017

History

37 Commits
Apr 8, 2017
Mar 7, 2017
Mar 7, 2017
Mar 27, 2017
Mar 7, 2017
Apr 6, 2017

Repository files navigation

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.hotcn.top/

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%