1.0.10 • Published 6 months ago

@wizmacau/i18n v1.0.10

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
6 months ago

@wizmacau/i18n

安裝

npm install @wizmacau/i18n
yarn add @wizmacau/i18n
pnpm install @wizmacau/i18n

使用方法

在 package.json 的 scripts 中加入 "i18n": "node i18n.config.js"

i18n.config.js:

const generateI18n = require('@wizmacau/i18n');
generateI18n({
  DOC_URL: `https://docs.google.com/spreadsheets/d/e/xxxxxxxx&single=true&output=csv`,
  LANG_PATH: `${__dirname}/output`,
  LANG_OBJS:{
    zh_TW: {},
    zh_CN: {},
    pt_BR: {},
    en_US: {},
  }
})
DOC_URL: 可在公司 Google Doc 中,菜單 => 檔案 => 共用 => 發佈到網絡 => 選擇 .csv 發佈
LANG_PATH: 目標位置
LANG_OBJS: 對應的用到語言
1.0.10

6 months ago