Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/yixianle/translate-api
- Owner: yixianle
- Created: 2017-03-06T16:28:31.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-02-20T09:52:12.000Z (almost 6 years ago)
- Last Synced: 2024-04-25T07:20:52.311Z (8 months ago)
- Topics: free, google-translate, page-translate, text-translation
- Language: JavaScript
- Homepage: http://translate.hotcn.top/
- Size: 26.4 KB
- Stars: 160
- Watchers: 12
- Forks: 41
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
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/## 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)
});```