yd-fanyi

1.0.2 • Public • Published

NPM

Install

$ npm install yd-fanyi

Usage

var fanyi = require('yd-fanyi')();
fanyi('how are you',function(err,res){
    if (err) {
        return console.log(err);
    }
    console.log(res.translation);
    //['你好']
});
 

返回数据类型还支持xml及jsonp,内容需要自己解析。

var fanyi = require('yd-fanyi')({doctype:'xml'});
 

Support:

中 - 英互译

英日韩法俄西 - 中

Readme

Keywords

Package Sidebar

Install

npm i yd-fanyi

Weekly Downloads

14

Version

1.0.2

License

ISC

Last publish

Collaborators

  • 2yuri