Table of Contents
隨著支援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.
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 |
After open the tool, click the button on the left to select the xlsx
file that you want to parse.
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.
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"]
}
}
Distributed under the MIT License.
Project Link: https://github.com/SDxBacon/electron-i18n-xlsx-to-json-converter