@carlhong/translate
v1.2.1
Published
translate Chinese to other language file
Downloads
4
Readme
@carlhong/translate
translate Chinese to other language file.
Install
$ npm install @carlhong/translate
Usage
//this is the default options
const defaultOptions = {
engine: 'google', //youdao, baidu, google
from: 'zh-CN',
to: 'en',
encoding: 'utf8',
srcFile: '',
distFile: ''
};
const translate = require('@carlhong/translate');
translate({
srcFile: 'zh_cn.json',
distFile: 'en.json'
})