Skip to content

mikejholly/node-google-translate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Translate API client for node.js. The new API (v2) is a paid service. To create a key, you'll need to go here https://code.google.com/apis/console and enter your credit card details.

var translate = require('../lib/translate')
  , assert = require('assert')

var key = '<your-secret>';

// Translate ones string
translate({key: key, q: 'my test', target: 'fr'}, function(result){
  console.log(result); // prints {"my test": "mon test"}
});

// Translate multiple strings
translate({key: key, q: ['one', 'two'], target: 'fr'}, function(result){
  console.log(result); // prints {"one": "un", "two": "duex"}
});

About

Uses the paid Google Translate API to translate text.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published