๐ Create a Custom Locale
This guide explains how to add your own language translation (locale) for use in Dream scripts.
Please use official language codes as file names (e.g., de
for German, fr
for French).
info
๐ฌ Feel free to share your translation with the community โ help others benefit!
๐ ๏ธ Step-by-Step Guideโ
1. ๐ Copy an Existing Localeโ
Navigate to the /settings/locales
folder.
Copy an existing file (e.g., en.lua
) and rename it using your language code.
Example:
de.lua
โ Germanfr.lua
โ French
2. ๐ Update the Locale Identifierโ
Open your new file and update the DreamLocales
identifier at the top to match your language code:
DreamLocales['en'] = {
-- Your translated keys
}
3. ๐ Translate the Valuesโ
Translate all values into your target language.
โ ๏ธ Do not change the keys โ only edit the text on the right side of each line:
["open_menu"] = "Menรผ รถffnen", -- โ
OK
["รถffne_menรผ"] = "Open Menu", -- โ Don't translate keys!
4. โ Activate Your Localeโ
To use your new locale, open the DreamCore
config file and set:
DreamCore.Language = 'de'
Replace 'de'
with your language code.
๐ง Tipsโ
- Test your translations in-game after saving.
- Ensure all keys are translated to avoid missing text.
- Never ever change the key names โ only the values.
- Keep formatting and special characters intact (e.g.,
~INPUT_CONTEXT~
,~r~
,%s
etc.) - Share your translation with others in the community!
Happy translating! ๐