/google-translate-api

The API from the official Google Translate Chrome extension.

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

google-translate-api

The API from the official Google Translate Chrome extension.

  • Change the source language from the URL parameter - sl

  • Change the translated language from the URL query parameter - tl

  • To run the script: node app.js

eg: Translation of the word "mother" from EN to SI

Result:

{
  sentences: [ { trans: 'මව', orig: 'mother', backend: 1 } ],
  src: 'en',
  confidence: 1,
  spell: {},
  ld_result: {
    srclangs: [ 'en' ],
    srclangs_confidences: [ 1 ],
    extended_srclangs: [ 'en' ]
  }
}