0 of 0

File information

Last updated

Original upload

Created by

Filipe Mazzon Ribeiro

Uploaded by

Mazzons

Virus scan

Safe to use

Tags for this mod

About this mod

This is a tool for modders who want to have only one mod for all languages using content patcher

Permissions and credits
Changelogs
it's a way to add use format i18 from SMAPI, to better maintenance of the mod itself.

example:


in my example download, I'm using Life Cycle mod to get a real example, if the owner of the mod doesn't want I can delete it and make a fake data.

if download Life Cycle, life cycle pt-br.

get the content.json file and change for the language shortcut, setting one as default( if you don't choose one as default I set en.json to default, or which one of below you create, but if you don't create the default.json will have 2 times data in content.json result, one as default and other for the language you choose).


valid filenames inside i18


Run Guide

  • You will need to install Node.js
  • put the content.json files inside i18 with a valid filename above.
  • open the terminal
  • run command "npm start"
  • wait for the message "File creating completed!"
  • get the generate  content.json file and put in your mod
  • zip and send it to nexus.

I choose this "architecture" because it's a lot easier to aggregate existent mods only copy and paste and change filenames basically


upsides:
  • create a pattern to build content patcher mods
  • easier aggregate for content patcher to multiple languages.
  • the games always will have all content besides the translation are outdate because the default content will be in the game, and the rest will be in the selected language, not causing an error if you use -{{language}} and not have the file.

know downsides:
  • it's harder to new content patcher get help with translation because of the file turn in a giant file, not so good to maintain by the download version. my suggestion is to open the code on GitHub or create an optional file with only the default content.json to help who want to translate your mod.
  • the JSON file can't have comments or bad formatted because this causes an invalid JSON file.