Creating a Translation Mod

Gettext based translation mod:

[Coming Soon]

Meanwhile, check out KyoPanda’s internationalization mod.


Json based translation mod:

  1. Create a folder with the language name. Ex: latin.
  2. Right click this link and click “Save As”. Save it as “plugin.js” inside the folder you created.
  3. Right click this link and click “Save As”. Save it as “translation.json” inside the folder you created.
  4. Open the translation.json file in a text editor and start translating.

Translation File Structure:

  "English Message" : "Translated Message",
  "Another english message" : "Another translated message",

The translation file includes every message present in the game, one per line, between quotes. In the right side of the line, you have the translated message, between quotes as well. The file you downloaded was empty, so you have to fill in the translations on it.

Example: (Taken from Portuguese Translation File).


     "I think probably every kid has wondered at least once, \\\"What do I want to be when I grow up?\\\"" : "Acho que toda criança já se perguntou alguma vez: \\\"O que eu quero ser quando crescer?\\\"",

     "There are as many answers to that question as there are stars in the sky." : "Tem tantas respostas possíveis para essa pergunta quanto há estrelas no céu.",

     "Plenty of dreams have been dreamed about becoming astronauts, movie stars, presidents and doctors." : "Muitas crianças sonham em se tornar astronautas, estrelas de cinema, presidentes e médicos.",


The \\\” is needed to include quotes inside of the messages.

Gender Specific Translations:

Some languages may need two separate translations, one for male players and other for female players. This can be achieved by adding the gender name to the end of the english message, separated with an underscore:

    "Me? I wanted to become a farmer._male": "Quanto a mim... Eu sempre quis ser fazendeiro.",
    "Me? I wanted to become a farmer._female": "Quanto a mim... Eu sempre quis ser fazendeira.",

If this is too much of a hassle, reach out to me and I can help you make some changes in the mod for your specific language. For example: in portuguese there are many words that change only one letter between the male and female version, so I solved it by doing this:

    "Me? I wanted to become a farmer.": "Quanto a mim... Eu sempre quis ser fazendeir<o>.",

In the portuguese translation mod, the <o> in this translation is automatically replaced by the letter “o” or “a” based on the player’s gender. If you need something similar for your mod and you don’t know how to code it, you can ask me and I’ll glady do it for you.