Skip to content

由Electron開發的 i18n tool。方便將多語系的excel檔案轉換成JSON文件,支援 Windows、MAC、Linux

License

Notifications You must be signed in to change notification settings

SDxBacon/electron-i18n-xlsx-to-json-converter

Repository files navigation

i18n Excel to JSON converter

Table of Contents
  1. About The Project
  2. Usage
  3. License
  4. Contact

About The Project

截圖 2022-01-06 下午5 37 53

隨著支援i18n已經是現代專案必備的需求, 這個工具主要是我做來方便工作用的小工具程式。選擇並導入多語系的excel檔案可以將其轉換成方便使用的JSON文件, 以便後續開發的調用。

As support for i18n has become a necessary requirement for modern projects, this tool is mainly a small tool program that I made to facilitate my work. Select and import a multilingual excel file to convert it into a convenient JSON file for subsequent development calls.

(back to top)

Built With

(back to top)

Usage

For example, if you got an i18n excel with two sheets and following contents:

SheetName1:

key en de
loremIpsum Lorem Ipsum is simply dummy text Lorem Ipsum ist ein einfacher Demo-Text
goodMorning Good morning Guten Morgen

SheetName2:

key en de
ERROR_MESSAGE Error Fehler
HELLO_AND_BYE hello !!\r\nbye bye hallo !!\r\ntschüss

Step 1, Import translation file

After open the tool, click the button on the left to select the xlsx file that you want to parse.

Jan-06-2022 19-05-32

Step 2, Export JSON

Once the parsing is done, you should see an thumbup icon (👍) in the middle of the application. Then, tap the button on the right to select the folder where you want to put all locales JSON files.

Jan-06-2022 19-08-49

FINIHSED!

You shall see all locales JSON files are stored in the folder you select at Step 2.
The example above, will output two files en.json and de.json with following contents:

en.json

{
  "SheetName1": {
    "loremIpsum": "Lorem Ipsum is simply dummy text",
    "goodMorning": "Good morning"
  },
  "SheetName2": {
    "ERROR_MESSAGE": "Error",
    "HELLO_AND_BYE": [ "hello !!", "bye bye"]
  }
}

de.json

{
  "SheetName1": {
    "loremIpsum": "Lorem Ipsum ist ein einfacher Demo-Text",
    "goodMorning": "Guten Morgen"
  },
  "SheetName2": {
    "ERROR_MESSAGE": "Fehler",
    "HELLO_AND_BYE": [ "hallo !!", "tschüss"]
  }
}

(back to top)

License

Distributed under the MIT License.

(back to top)

Contact

Project Link: https://github.com/SDxBacon/electron-i18n-xlsx-to-json-converter

(back to top)

About

由Electron開發的 i18n tool。方便將多語系的excel檔案轉換成JSON文件,支援 Windows、MAC、Linux

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages