Diet (Fabric/Forge/Quilt)

Diet (Fabric/Forge/Quilt)

7M Downloads

[Question]: Localization?

Boolyman opened this issue ยท 5 comments

commented

What is the new feature or improvement?

Silly question that I should probably know already... Where do you put the localization script for the tables? In the food groups file? Or do they need their own json? If so, does that json go in the datapacks folder too?

commented

What do you mean by tables? Localization for what exactly, custom food groups? It's briefly touched on here:
https://github.com/TheIllusiveC4/Diet/wiki/Customizing-Food-Groups#localization

Essentially you would create a resource pack, or whatever will let you add new language keys, and then just add another key for groups.diet.insertgroupnamehere.name.

Let me know if that's not what you're referring to.

commented

I appreciate your response, I got sidetracked by a few other issues in pack development, but I will revisit this very shortly.

commented

So I created three new food groups, and have ditched the old ones. The groups load fine into the game, but I am trying to add localization for them now. I placed the new eng_us.json localization into the .minecraft/saves/(world-name)/datapacks/(datapack-name)/assets/diet/lang folder. The syntax of the file is:

{
  "groups.diet.comforted.name": "Comforted",
  "groups.diet.satiated.name": "Satisfied",
  "groups.diet.spirited.name": "Spirited"
}

When I load the game, the localizations are not applied. Can you tell me what I did wrong?

Also, I am using KubeJS. What folder would I need to put these files into, within KubeJS, in order to have them load into every world that is generated? I tried putting them into Data, and they did not apply.

commented

I placed the new eng_us.json localization into the .minecraft/saves/(world-name)/datapacks/(datapack-name)/assets/diet/lang folder.

Localization files are not part of datapacks, they are part of resource packs. They would need to be a part of a resource pack and then put into the .minecraft/resourcepacks folder. Also, just making sure, is that a typo with eng_us.json? Because it should be en_us.json.

Also, I am using KubeJS. What folder would I need to put these files into, within KubeJS, in order to have them load into every world that is generated? I tried putting them into Data, and they did not apply.

I'm not that familiar with KubeJS, but looking at some other modpacks that use it, I believe you're supposed to put them into the kubejs/assets/diet/lang directory.

commented

The localization does go in that KubeJS directory and worked fine. Thanks for the help.