Can we use localized strings in procedures?

Started by ahznb on

Topic category: Help with Minecraft modding (Java Edition)

Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can we use localized strings in procedures?

So I was wondering, if we add a new custom localization entry, can we then use that string in procedure blocks?

If so, how do we use it? If not, maybe it would be a nice feature to add?

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yes, using the code editor
Tue, 12/03/2024 - 19:23

Yes, using the code editor

Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
With code, wherever you have…
Wed, 12/04/2024 - 01:46

With code, wherever you have the string, you can instead do Component.translatable("your.localization.key")

Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This does assume whatever…
Wed, 12/04/2024 - 01:49

This does assume whatever you're doing accepts a component (you might be able to add .toString() to the end if you need it to be a string, but I'm not sure it works since I never tested it)