Socket
Socket
Sign inDemoInstall

gtranslate-api

Package Overview
Dependencies
3
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gtranslate-api

Free And Unlimited Google Translate API


Version published
Weekly downloads
5
Maintainers
1
Created
Weekly downloads
 

Readme

Source

A free and unlimited API for Google Translate :dollar::no_entry_sign:

Features

  • Auto language detection
  • Spelling correction
  • Language correction

Install

npm install gtranslate-api

or

yarn install gtranslate-api

Usage

for automatic detection language:

const trans = require('gtranslate-api');

trans.getSentence('Aku orang indonesia', {to: 'en'}).then(res => {
console.log(res.translation);
//=> I am Indonesian
})

for specific language:

trans.getSentence('Aku orang indonesia!', {from: 'id', to: 'end'}).then(res => {
console.log(res.translation);
//=> I am Indonesian

})
it's also can get dictionary from translation
trans.getDictionary('Aku orang indonesia!', {from: 'id', to: 'end'}).then(res => {
console.log(res.translation);
//=> I am Indonesian

})

API

getSentence(text, options)

getDictionary(text, options)

License

MIT © Abdul Muttaqin

Keywords

FAQs

Last updated on 16 Mar 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc