i18n-auto-cli
v0.0.10
Published
Translate simplified Chinese to traditional Chinese (HK TW)
Downloads
11
Readme
i18n-auto-cli
Translate simplified Chinese to traditional Chinese (HK TW) and English(on work) In order to project automatically internationalization;
Thanks to
Installation
npm
npm i -g i18n-auto-cli
yarn
yarn global add i18n-auto-cli
Usage
version
i18n-auto -V
help
i18n-auto -h
simplified2traditional
i18n-auto -t you-path-to-untranlsate-dir-or-file -d you-path-to-outdir-or-file -l you-target-language[zh-HK|zh-TW]
Sync the key (-i option support to ignore the entry file)
i18n-auto -s -t you-path-or-dir -d you-path-or-dir -i index.js;
Demo
Single file
./zh.json
// to zh-TW
i18n-auto -t ./zh.json -d ./tw.json -l zh-TW
// to zh-HK
i18n-auto -t ./zh.json -d ./hk.json -l zh-HK
Directory (recursive)
./zh-CN
i18n-auto -t ./zh-CN -d ./zh-TW -l zh-TW
// ...etc
No English translation function yet; I need a free translate API;
Roadmap
- [x] Matching different in Chinese and English and synchronous the corresponding key;
- [] zh-CN to en-US;
PR welcome.