Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/indiependente/transleight
Node.js Google Translate based easy translation stream module
https://github.com/indiependente/transleight
Last synced: 5 days ago
JSON representation
Node.js Google Translate based easy translation stream module
- Host: GitHub
- URL: https://github.com/indiependente/transleight
- Owner: indiependente
- License: mit
- Created: 2014-08-08T15:13:30.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-02-13T10:04:55.000Z (almost 8 years ago)
- Last Synced: 2024-12-22T15:40:28.260Z (14 days ago)
- Language: JavaScript
- Homepage:
- Size: 234 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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 the `Language` as key and the `Code` 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:
```javascript
var trnsl8 = require('transleight');streamA.pipe(trnsl8.stream('targetLanguage')).pipe(streamB);
```##ToDo
- [x] Accept Encoding _gzip_
- [ ] Sentence Boundary Splitting##License
####MIT