Skip to content

自动将中文转换成繁体 (HK TW) 同步国际化文案 翻译英文等

Notifications You must be signed in to change notification settings

deboyblog/i18n-auto-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

自动将中文转换成繁体 (HK TW) 同步国际化文案 翻译英文等

Resources

Stars

Watchers

Forks

Packages

No packages published