1.0.0 • Published 10 years ago
dictcc-js v1.0.0
dictcc-js
An unofficial API for dict.cc
##Installation
Run npm install dictcc-js.
##Documentation
Current dictcc-js only has one function, translate
translate takes 4 arguments:
fromis the language you're translating from.tois the language you're translating to.termis the term you would like to translate.callbackresponse- The response value is an array of objects with a
fromproperty and atoproperty.
- The response value is an array of objects with a
errornullif no error.
Either the from or to argument must be either "en" or "de"
dictcc = require('dictcc-js');
dictcc.translate("en", "de", "term", (res, err) => {
res.forEach((val, ind, arr) => {
console.log(val.from + " = " + val.to);
});
});##Troubleshooting
Make sure the languages you're translating are supported. Currently supported languages only include:
- Bulgarian
- Bosnian
- Czech
- Danish
- Deutsch
- Greek
- English
- Esperanto
- Spanish
- Finnish
- French
- Croatian
- Hungarian
- Icelandic
- Italian
- Latin
- Dutch
- Norwegian
- Polish
- Portuguese
- Romanian
- Russian
- Slovak
- Albanian
- Serbian
- Swedish
- Turkish
##Contributing Feel free to fork this and make a pull request or file an issue.
1.0.0
10 years ago