Skip to content

napunapu/node-wiktionary-translation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-wiktionary-translation

Library for Wiktionary word translation

General notes

Wiktionary.org is a difficult platform to use programmatically as each language has a template of its own (some share a template, but the variation is unbelievably large).

As it currently stands, this library can get word translations without further explanations. The following languages are supported:

Usage

Example:

var wiktionary = require('node-wiktionary-translation')();
// English terms for "Hafen" (German)
wiktionary.getDefinition('Hafen', 'de', 'en', function (terms, err) {
  // terms contains an array of "harbour", "port" and "haven"
});

An optional configuration object can be given as parameter. Currently only a logger can be given, e.g.:

var myOwnLogger = ...;
var wiktionary = require('node-wiktionary-translation')({
  logger: myOwnLogger
});

License

MIT

About

Library for Wiktionary word translation

Resources

License

Stars

Watchers

Forks

Packages

No packages published