Question How to create translation keys for a mod's i18n?

I have created the Pack Collection mod (Nexus link) and I have been pulling my hair to figure out how to translate different items in my mod when they all share the same translation key because they all edit the same item?

According to this page: SDV Wiki | Modding: Translations, a default.json contains text that looks like this:
Code:
{
   "translation-key": "simple translatable text",
   "translation-key-2": "translatable text with a {{token}} value"
}
However, my mod's content.json lacks distinct translation keys for each item for me to give them their proper translations:
Code:
{

    "Format": "2.0.0",

    "Changes": [

        {

            "Action": "EditData",

            "Target": "platinummyr.CustomBackpackFramework/dictionary",

            "Entries": {

                "24": {

                    "name": "Large Pack",

                    "cost": 2000,

                    "texturePath": "platinummyr.CPMoreBackpacks/backpacks",

                    "textureRect":

                    {

                        "X":0,

                        "Y":0,

                        "Width": 12,

                        "Height":14

                    }

                },

                "36": {

                    "name": "Deluxe Pack",

                    "cost": 10000,

                    "texturePath": "platinummyr.CPMoreBackpacks/backpacks",

                    "textureRect":

                    {

                        "X":12,

                        "Y":0,

                        "Width": 12,

                        "Height":14

                    }

                },

            }

        },

        {

            "Action": "Load",

            "Target": "platinummyr.CPMoreBackpacks/backpacks",

            "FromFile": "assets/packcollection.png"

        }

    ]

}
Note how there are two items. As you can see in this example here, the Large Pack and the Deluxe Pack, both share the key: "name", instead of having their own translation key each, that would otherwise enable translation of these names.

Does anyone to advice me know how add translation keys to these items in my contents.json?
 
Last edited:
Top