Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yixianle/translate-api

A free google translation api, support text and page
https://github.com/yixianle/translate-api

free google-translate page-translate text-translation

Last synced: 5 days ago
JSON representation

A free google translation api, support text and page

Awesome Lists containing this project

README

        

# 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

```javascript
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)
});

```