HTML 国际化工具
1. 安装 Node.js
2. npm install
3. 安装 yarn 代替 npm (可选)
npm i -g yarn
- 生成 JSON 文件
npm run parse test/test.html
// 或 yarn parse test/test.html- 翻译 JSON 文件
输入两次 Ctrl + C 终止,机翻后可手动校对
npm run trans test/test.json -t en
// 或 yarn trans test/test.json -t en- -t zh 指定目标语言
- -n 50 指定更新频率
- 还原 HTML 文件
node ./bin/html.js render test.html test.json- JSON 转 EXCEL
node ./bin/html.js convert test.json- EXCEL 转 JSON
node ./bin/html.js convert test.xlsx