1.2.1 • Published 5 years ago

@carlhong/translate v1.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

@carlhong/translate

npm (scoped)

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'
})