By changing one parameter in the code, it makes EUD editor compile it to a different language.
It can convert strings in SCMDraft triggers, forces, map name and description, mission briefing, unit names and stat_txt text.
This reduces the effort needed to manage different code for different languages when you update the map every time.
Result:
For example:
Compiles to English
function onPluginStart() {
db.init("en", "1.00"); // version 1.00
...
DisplayTextAll(ST.GAME_START);
}
db.init("en", "1.00"); // version 1.00
...
DisplayTextAll(ST.GAME_START);
}
Compiles to Korean
function onPluginStart() {
db.init("kr", "1.00"); // version 1.00
...
DisplayTextAll(ST.GAME_START);
}
db.init("kr", "1.00"); // version 1.00
...
DisplayTextAll(ST.GAME_START);
}
I have used it for multiple maps right now, and it is useful to create Korean maps to
It only works with EUD maps. For non-EUD maps you can use Map String Viewer to export the strings, then translate them and import it back.
How it works:
- Write every string for each language in an Excel spreadsheet.
- Run convert.ps1 (right click => run in powershell) to convert the spreadsheet to JSON.
- Import the db.py in EUD Editor.
- import db.ST in the epScript code, then whenever you need to print a string, print ST.STRING_NAME instead.
- Every time you update the map, simply change the language parameter to compile it to different language. (db.init("en", "1.00") => db.init("kr", "1.00"))
For the translation part, simply ask an AI to translate it. They won't notice. (
Image walkthrough:
Write strings in each language in the "strings" sheet.
If you need to add more languages, simply add for example val_fr in the next column and write each string.
The first two strings are used for map name and description.
Convert the Excel sheets into data.json using the powershell script.
I originally used a python script, but for cases where Python is not installed, I vibecoded this powershell script which always works.
Put the db.py in the same folder and use the option "temp files location" => "map file folder".
Then add the db.py file as plugin here [../../db.py] to load it.
Import db and db.ST in epScript code.
Whenever you need to display text/printAt, change the string to variable ST.STRING_NAME.
SCMDraft triggers can use it too. (I usually write everything in EUD editor but it should work as well)
Write mission briefing, forces, stat_txt and unit names in the "map_strings" sheet.
For mission briefing, use type "mb" in the spreadsheet, then write whatever in the briefing text and it replaces each string from top to bottom.
For forces, stat_txt and unit names use types "f", "s" and "u" and it replaces them based on stat_txt index or unit ID.
For stat_txt strings, also make it very long in the EUD editor text editor to make sure it can contain every language.
If the string is too short, it may spill into other strings.
Using it in EUD editor 2:
For some reason it always crashes for me when I save the file, but I figured out how to do it in EE2 as well.
Add the plugin here with absolute path to load it.
Change the path in db.py to use absolute path as well, since you cannot make EE2 use the map folder.
Add the import instruction at the top, then write raw code => db.init("en"); inside onPluginStart.
Use ST.STRING_NAME in the trigger editor.
Demo map and source code download:
https://staredit.net/?downloadAttachment=12283&key=2224870
(the "i18n_demo.zip")
Attachments:
Post has been edited 16 time(s), last time on Yesterday, 2:42 pm by LDConval.






