excel-lang
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

excel-lang

使用 excel 配置多语言,转化为 json 文件

Usage

const excelLang = new ExcelLang(path.resolve(__dirname, './lang.xlsx'), {
  filename: 'lang.json',
  filepath: path.resolve(__dirname, './'),
})
excelLang.init()

excel 配置如下

|      | zh_CN    | en         | ... |
| ---- | -------- | ---------- | --- |
| name | 姓名     | Name       | ... |
| succ | 操作成功 | Successful | ... |
| ...  | ...      | ...        | ... |

生成json文件如下

{
  "zh_CN": {
    "name": "姓名",
    "succ": "操作成功"
    // ...
  },
  "en": {
    "name": "Name",
    "succ": "Successful"
    // ...
  }
  // ...
}

Package Sidebar

Install

npm i excel-lang

Weekly Downloads

1

Version

0.0.4

License

ISC

Unpacked Size

9.95 kB

Total Files

5

Last publish

Collaborators

  • gphp_007