Localization

The following contains in-depth technical documentation on how to use TS!UNDERSWAP's localization systems.

If you have any further questions or concerns, don't hesitate to join our Discord server to talk to us!

Also, this page will update in the future. This current information is up-to-date as of Demo 2.0.7. To see the old documentation for Demo 1.0, go here.



Debug Mode

DISCLAIMER: Using debug mode can seriously corrupt your game saves and files. Use it at your own risk. Savedata produced in debug mode may cause errors and crashes in later releases of the game, as well.

Additionally, no official support is provided for using debug mode, even if you break your game using it. These features are subject for change and removal at any given time.

How to enable on Windows

Relevant Commands

Listed here is a subset of debug mode commands that are useful for localization purposes in demo 2.0. More commands exist, but are not documented here.



How to Make a New Language

Getting Started

Step 1: In the game's data folder, create a lang folder if one does not already exist. Here, you can put localization files for any number of languages installed.

Step 2: Copy the game's default.json file from the data folder into the lang folder. Rename it to something unique for your language, and customize it in a text editor of choice!

Step 3: You will want to make a new folder for your language's remaining data files (including text, sprites, sounds). This will be what you use for the directory in the JSON file you made a copy of.

What's all of this JSON stuff?

See the below section that goes into detail. JSON is a common file format used to represent data.

Distribution

To distribute unofficial language patches, you can ZIP up your files (including the copied JSON) and share it with others. On older versions of the game, people may be required to create a lang folder to extract to, but once official localization patches exist, it should be there automatically.

If you would like to make an unofficial localization patch official, we are open to manually reviewing the patches. However, we will need proper verification that it is of good quality. We're open to talk on our Discord server!



Localization File Structure

JSON Config File

Translation File Types

There are multiple formats that can be used to represent the text data of a language. Here's a list:

You can get the base English translation files used in Demo 2.0.7 here! You can choose either version you prefer to work with, and convert between as you see fit.

Note: Old translation files from Demo 2.0.6 can be found here, for comparison/upgrade purposes.

When used as part of a language (by updating diannex in the config JSON file), these files will override all of the existing in-game text.

Converting Between Translation File Types and Versions

Translation files are built on a system called Diannex, which has a command-line tool used to convert between types. It currently supports 64-bit Windows officially, but can be manually built for other platforms.

To use the Diannex tool, you can download the version used by TS!UNDERSWAP from GitHub.

Note: If your browser or antivirus believes Diannex is malware, try to allow the file to download and run anyway. It's a false positive due to the EXE not being commonly downloaded.

You'll want to put diannex.exe into a folder with your all of your translation files. Make sure to back them up before running anything. When there, open a command line or terminal in that folder (or navigate to that folder using the cd <path> command). Then, you have multiple options for commands to run:



Text Formatting

TS!UNDERSWAP has custom text formatting syntax used for dialogue, as well as some menus and UI. This section will describe some of it.

Mid-Text Commands

Everything enclosed with two ` characters is not displayed on screen. They signify a "mid-text command," and can change properties of the text.

The first character after the opening ` tells the type of command. Following that is any parameters, such as a specific text color/effect. After the parameters is the closing ` character.

Here's a list of useful commands to know:

Additional Formatting

You can insert new lines of dialogue to the game!

You can remove lines of dialogue from the game! (To an extent.)

You can change and add face portraits/characters to lines of dialogue!