A downloadable tool for Windows and macOS

Download NowName your own price

Description

this plugins then you can use exl and easy to  set Multilingual


How To Use

STEP 1:
create a folder and call csv in your project


STEP2:

basic use, check your exl  column sam the plugins param

then you can add your code in  show text or other event with \T[your_lang_text_id]

it also can use on DataBase text 

STEP 3

use command change lang


How To Add new Lang ?

just add new column on your exl , and donw forget set it in plugin param 



Other

 I Suggest use google drive to edit and download csv file,  because use office may be had syntax code error( it must use UTF-8)



Terms of Use

1. These plugins may be used in free or commercial games. 
2. 'Chimaki' can be given credit in your games if you want :)
3. Do NOT change the filename, parameters, and information of the plugin.
4. You are NOT allowed to redistribute these Plugins.
5. You may NOT take code for your own released Plugins.



Change log 

2021.7.21  v1.2
1. add plugins command change lang
2. use \T[your code id ] to use lang

StatusReleased
CategoryTool
PlatformsWindows, macOS
Rating
Rated 5.0 out of 5 stars
(4 total ratings)
AuthorConviction
Tags2D, rmmz, RPG Maker

Download

Download NowName your own price

Click download now to get access to the following files:

UI.csv 150 bytes
Chimaki_Lang.js.zip 4.3 kB

Comments

Log in with itch.io to leave a comment.

您好:您csv好像处理crlf(\r和\n,webpack后的line299)有点儿问题导致我但凡在linux上编辑csv(使用\n)就会导致大面积字串undefined。 考虑到反正您也用webpack了,有考虑直接import个现成csv parser库替代手动解析来防止这种问题吗?

另外您打包的时候把mac的__MACOSX文件夹也打包进去了诶...

比如 https://www.npmjs.com/package/csv-parse 之类的

搓完了:

class CsvManager {
    static #parseCsv(text) {
       const rows = []
       let row = []
       let field = ''
       let insideQuotes = false
       let i = 0
       while (i < text.length) {
          const char = text[i]
          const next = text[i + 1]
          if (insideQuotes) {
             if (char === '"') {
                if (next === '"') {
                   field += '"'
                   i++
                } else {
                   insideQuotes = false
                }
             } else {
                field += char
             }
          } else {
             if (char === '"') {
                insideQuotes = true
             } else if (char === ',') {
                row.push(field)
                field = ''
             } else if (char === '\n') {
                row.push(field)
                rows.push(row)
                row = []
                field = ''
             } else if (char === '\r') {
                // skip or normalize \r\n
                if (next === '\n') {
                   i++
                }
                row.push(field)
                rows.push(row)
                row = []
                field = ''
             } else {
                field += char
             }
          }
          i++
       }
       if (field !== '' || insideQuotes || row.length > 0) {
          row.push(field)
          rows.push(row)
       }
       return rows
    }
    static async parseLang(fileName) {
       let translations = {};
       LANG_LIST.forEach((langCode => {translations[`${langCode}`] = {}}));
       let colIndex = {};
       LANG_LIST.forEach(((langCode, idx) => {colIndex[`${langCode}`] = idx + 2}));
       const fs = require("fs");
       const str = await fs.promises.readFile(`./csv/${fileName}.csv`, "utf8");
       const csv = CsvManager.#parseCsv(str)
       for (const line of csv) {
          const id = line[0];
          for (const langCode in colIndex) {
             let cell = line[colIndex[langCode]].replaceAll(/\r\n|\r|\n/g, "\n");
             translations[langCode][id] = cell
          }
       }
       return translations
    }
};

大佬你好,請問為什麼我在遊戲測試中打開控制台會一直閃紅?(文字顯示正常,但是每次打開窗口或顯示文本時,就會這樣。)

(1 edit)

我的log沒有清除掉,已經進行更新,

重新下載試試,感謝拉

重新下載並啟用後 遊戲直接無法啟動

再更新一次囉,感謝

能運行了 但還是log一堆……o(╥﹏╥)o

好像漏砍了,拍謝沒留原本的程式碼有點盲改ha

16:00 更新一版,應該是可以了XD