Translating the GUI

Started by RussianSniperYT on Sat, 12/12/2020 - 12:12

Topic category: Help with modding (Java Edition)

Last seen on 14:54, 20. Dec 2020
Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Translating the GUI
Sat, 12/12/2020 - 12:12

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

Last seen on 04:37, 2. Apr 2021
Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
You can go to the top of…
Wed, 12/16/2020 - 12:08

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.

Last seen on 14:54, 20. Dec 2020
Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Can you tell more?
Sat, 12/19/2020 - 09:33

Can you tell more?

Last seen on 14:54, 20. Dec 2020
Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Can you tell more? On…
Sat, 12/19/2020 - 10:00

Can you tell more? On version 2020.2

Last seen on 04:37, 2. Apr 2021
Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Sorry i didn't explain that…
Sat, 12/19/2020 - 23:25

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.

Last seen on 04:24, 12. May 2022
Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I think you can use a String…
Sun, 12/26/2021 - 22:06

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

Last seen on 07:38, 8. May 2022
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Well - you could still use…
Fri, 03/25/2022 - 23:52

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^^

Last seen on 07:38, 8. May 2022
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
It is not necessary to…
Sat, 03/26/2022 - 00:29

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.