@imshawan/gslate
v1.2.0
Published
Google translator API - an open-source javascript library for your NodeJS projects that enables speech translation
Downloads
7
Maintainers
Readme
Google Translator API
An open-source javascript library for your NodeJS projects that enables speech translation. Inspired from goslate.
Install via npm
$ npm install --save @imshawan/gslateUsage
Translator.Translate(param1, param2, param3 [optional] )
param1String (Your query)param2String (Translation language)param3String (From Language), Default:auto- Returns a promise based object
Note: Keep the param3 (from Language) as auto, in order to auto-detect your query language
Example
const Translator = require( '@imshawan/gslate' )
Translator.Translate("Hello", "hi") // "hi" is the language code for Hindi
.then((response) => {
console.log(response)
})Languages Help
This method will help you in getting all the languages that are supported along with their language code in JSON format.
Example
const Translator = require( '@imshawan/gslate' )
Translator.getLanguages()
.then((response) => {
console.log(response)
})About
Copyright (c) 2021 Shawan Mandal.
