Breaking lines in JSON language files

Started by Oxxxygen on

Topic category: Help with Minecraft modding (Java Edition)

Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Breaking lines in JSON language files

As you know, earlier in LANG files it was possible to break lines using escape sequences. Is it possible to do the same with JSON files? Or will I have to add some text labels to my GUI? For example, I have the line "This text is too long and won't fit on one line". Is there anything I can do to split it into two lines? In this case, the localization field should remain the same for the entire string.

"text.verylongline": "This text is too long and won't fit on one line"

 

As long as I know, .json…
Fri, 02/25/2022 - 12:49

As long as I know, .json syntax is really strict and doesn't allow such construction. But the line length is infinite, this means that you can easily put whatever you want there, you just won't see it entirely in one go.