0.2.0 • Published 8 years ago
transleight v0.2.0
transleight
Node.js translation stream module
##What is transleight transleight is a Stream. So everything you pipe into it, is transformed in the target language you specified. LANGUAGE-A => transleight => LANGUAGE-B
Super easy!
The translation is powered by Google Translate
##APIs transleight offers two apis:
transleight.stream(lang)
: it returns a stream that converts every text that receives in input, into text in language lang.transleight.supportedLangs()
: it returns an object containing all the supported languages. Every entry has theLanguage
as key and theCode
as value. E.g.json{ English : 'en' }
.
##Installation transleight is on https://www.npmjs.org
npm install transleight
##Examples
The examples
folder contains more code.
transleight should be used like every other stream:
var trnsl8 = require('transleight');
streamA.pipe(trnsl8.stream('targetLanguage')).pipe(streamB);
##ToDo
- Sentence Boundary Splitting
- Accept Encoding gzip
##License ####MIT