ShadowMario / FNF-PsychEngine

Engine originally used on Mind Games mod
Apache License 2.0
1.15k stars 2.22k forks source link

Translated dialogues #15751

Open JuanSebas1247 opened 1 month ago

JuanSebas1247 commented 1 month ago

Describe your problem here.

How can I put translated dialogues depending on the selected language, using the English and Portuguese of the game?

Are you modding a build from source or with Lua?

Lua

What is your build target?

Windows x64

Did you edit anything in this build? If so, mention or summarize your changes.

No response

KELOTOMU commented 4 weeks ago

Make different json files for each dialogue with their own names ex. dialogue-portuguese.json you can optionally name the default language just dialogue.json for good practice. In the script that you load the dialogues in, add if statements checking on what option is selected to load the specific dialogue json needed.

If you don't know how to settings, check wiki how to add Mod Settings and in your if statements, you will do getModSetting(saveTag:String)