1.0.3 • Published 11 months ago

googleapi-translate v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

Node Google API Translation

To translate languages with Google Translation API V2

Installation

Install this package via npm.

npm install googleapi-translate

Usage

  • import the package and create a new object by passing token
let googleApi = require("googleapi-translate")

let googleTranslation = new googleApi({token: 'this is token'})
  • default hostname is ''translation.googleapis.com'' and you can also pass hostname like this :
let googleTranslation = new googleApi({token: 'this is token', hostname: 'this is hostname'})

Translate

googleTranslation.translate("hello", "en", "ja").then((res)=>{
    console.log(res);
})

Detect the language

googleTranslation.detect("hello").then((res)=>{
    console.log(res);
})

Get supported languages

googleTranslation.getLanguages().then((res)=>{
    console.log(res);
})

Security

If you discover any security related issues, please email them to waithawoocw@gmail.com instead of using the issue tracker.

License

The MIT License (MIT). Please see the License File for more information.

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago