en2ch
v1.0.6
Published
翻译, 英译汉, 百度翻译, fanyi, translate, translator, (baidu translator), E-C, English-Chinese, English to Chinese
Downloads
19
Maintainers
Readme
en2ch
Use baidu fanyi api, to archieve English text to Chinese text translation. Thanks baidu fanyi~
Prepare
npm i en2ch --save
Use
const en2ch = require('en2ch');
en2ch('hello world').then(ret => {
console.log(ret); // "你好世界"
}).catch(err => {
console.log(err.message);
});
Example
npm run example
Test
npm run test
npm run test-cov