Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fdciabdul/google-translate-api
Free and Unlimited Google Translate API
https://github.com/fdciabdul/google-translate-api
Last synced: 12 days ago
JSON representation
Free and Unlimited Google Translate API
- Host: GitHub
- URL: https://github.com/fdciabdul/google-translate-api
- Owner: fdciabdul
- License: gpl-3.0
- Created: 2022-03-13T11:15:57.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-11-09T09:57:08.000Z (about 2 years ago)
- Last Synced: 2024-11-01T07:51:49.614Z (19 days ago)
- Language: JavaScript
- Size: 24.4 KB
- Stars: 9
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
README
A **free** and **unlimited** API for Google Translate :dollar::no_entry_sign:
## Features
- Auto language detection
- Spelling correction
- Language correction## Install
```bash
npm install gtranslate-api
```
or```bash
yarn add gtranslate-api```
## Usagefor automatic detection language:
``` js
const trans = require('google-translate-api');trans.getSentence('Aku orang indonesia', {to: 'en'}).then(res => {
console.log(res.translation);
//=> I am Indonesian
})
```for specific language:
``` js
trans.getSentence('Aku orang indonesia!', {from: 'id', to: 'en'}).then(res => {
console.log(res.translation);
//=> I am Indonesian})
```#### it's also can get dictionary from translation
``` js
trans.getDictionary('Aku orang indonesia!', {from: 'id', to: 'en'}).then(res => {
console.log(res.translation);
//=> I am Indonesian})
```## API
> getSentence(text, options)> getDictionary(text, options)
## License
MIT © [Abdul Muttaqin](http://aqinshare.my.id)