google-translation

0.0.6 • Public • Published

google-translate

Just Google translator module for node.js

Installation

$ npm install google-translation

API

var authObj = {
  apiKey: GOOGLE_TRANSLATE_API_KEY,
  jwtEmail: GOOGLE_SERVICE_ACCOUNT_EMAIL,
  jwtKey: GOOGLE_SERIVCE_ACCOUNT_PRIVATE_KEY
};
var translator = require('google-translation.js').init(GOOGLE_TRANSLATE_API_KEY);
var obj = {
    text: '독도는 대한민국 영토 입니다.'
    target: 'en',
    model: 'nmt' // enum nmt|smt
};
translator.translate(obj, function(err, res) {
  console.log(err, res);
});

Reference

Please refer to this link for the more information.

Package Sidebar

Install

npm i google-translation

Weekly Downloads

2

Version

0.0.6

License

MIT

Last publish

Collaborators

  • seouldeveloper