Started by
RussianSniperYT
on
Topic category: Help with Minecraft modding (Java Edition)
I wanted to ask if it is possible to translate the GUI to another language. I created a version in a non-native language, but I want to do it in many languages
You can go to the top of MCreator and select files, preferences then press interface language and choose a language. if you want to make different languages for your mod GUI, you can create a setting which selects a language. you can then create a procedure which has a lot of if statements which detects the language then changes the language of everything.
Can you tell more?
Can you tell more? On version 2020.2
Sorry i didn't explain that well. But you can create a user interface which has a setting where you select languages. Then you can make a procedure that includes if statement, like 'if: english = true' then change the ui to that language (make a new ui to replace).
Otherwise there is no way to do that currently all the up to version 2020.5. Im not too good at coding but hopefully this works for you.
I think you can use a String variable too for that. Set the name of the gui or whatever you wanna change with the language to this variable and then use the procedures to detect what language. The problem is that i don't know how you can "detect" the currently selected language, so there's no way of changing the string
Well - you could still use the translation keys in combination with the string variables - means the client only changes the content of the key when detecting a change of language from the client.
sorry for my bad english^^
It is not necessary to change the string - it is sufficient to use only one per text - changing the language would only change the language of the key.
e.g. with an english client the text dog would still be dog. on a german client the translation key would replace the text dog in hund.