https://github.com/zyao89/i18nutils
可对多国语言进行转换,输入输出。并可检测 key 关键字的正确性与重复关键字,可输出报告结果。
https://github.com/zyao89/i18nutils
Last synced: 10 months ago
JSON representation
可对多国语言进行转换,输入输出。并可检测 key 关键字的正确性与重复关键字,可输出报告结果。
- Host: GitHub
- URL: https://github.com/zyao89/i18nutils
- Owner: zyao89
- License: mit
- Created: 2018-05-22T15:57:43.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-05-22T18:15:56.000Z (over 7 years ago)
- Last Synced: 2025-02-05T15:52:40.737Z (12 months ago)
- Language: JavaScript
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## i18n 多语言处理工具
> 可对多国语言进行转换,输入输出。并可检测 key 关键字的正确性与重复关键字,可输出报告结果。
### First Step
```sh
npm install
```
### JSON to Excel
```js
const i18nUtils = require("../i18nUtils");
i18nUtils.toExcel();
```
### Excel to JSON
```js
const i18nUtils = require("../i18nUtils");
i18nUtils.toJson();
```
### JSON 中 Key 值检测
```js
const i18nUtils = require("../i18nUtils");
i18nUtils.toCheck();
```
### config 配置使用
```js
// config/index.js
{
jsonPath: "../json", // JSON根路径
excelPath: "../excel", // Excel根路径
resultPath: "../result", // 检查结果根路径
fileName: "i18n_字符串.xlsx", // Excel文件名
}
```