translat

0.0.2 • Public • Published

translat

Translation using just page-fetching

Imortant

While using languages like Chinese, all inputs are reguarded as sentences, so they are probably capitalized.

Usage

npm install translat
var translat = require('translat'),
    translator = translat.create({
        from: 'en', to: 'zh-CN'
    });
translator.get('I love you', function(err, result){
    console.log(result); // 我爱你
});
// dynamically switching languages
translator.defaults({
    from: 'fr', to: 'en'
}).get("Je t'aime", function(err, result){
    console.log(result); // I love you
});

Testing

  1. Make sure that you have mocha installed globally.

    npm install -g mocha
  2. Download the package from the repository.

  3. Run from inside.

    cd translat
    npm test

Package Sidebar

Install

npm i translat

Weekly Downloads

2

Version

0.0.2

License

none

Last publish

Collaborators

  • fritz-lium
  • fritx