Skip to content

Latest commit

 

History

History
78 lines (52 loc) · 1.25 KB

README.md

File metadata and controls

78 lines (52 loc) · 1.25 KB

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

  • Matching different in Chinese and English and synchronous the corresponding key;
  • [] zh-CN to en-US;

PR welcome.