Translating the Game

Intro
Adding a new Language to Rise of Industry is very easy and only requires the creation of a few basic content items. There is no need for programming knowledge, or even the use of Visual Studio or Unity. Notepad or Excel is sufficient.

The first thing we need to do is to put a *.lang file inside the assets folder of our mod. The *.lang file contains all the strings the game uses.

The one we provide HERE has an entry on each line representing a string to translate.

It’s tabulated, so you can import it in Excel or Open/LibreOffice if it’s easier for you. Just make sure it’s divided by tabulations when exporting it back for the mod usage.

The format on an entry is the following:

KeyID [TAB] Max length of the string [TAB] English Text [TAB] English Text (again)
 * The KeyID column can never be changed
 * Max length is an hint for the translator, indicating that the translated string should not be longer than the specified amount of characters (increase the limit by 20% if using the Roman/Latin alphabet). Doing otherwise may result in text overflowing the game UI.
 * The 3rd column is the text as it appears in the English language.
 * The 4th column is what the game will read. In the file we provide, we simply copied the English text in the 4th column, so you can keep track of the original string.

Note1: If your mod only translates some of the strings, you can delete entire rows from the *.lang file. When a key is missing, the game will default to the English language.

Note2: for the mod to work, the characters need to be in-game. If you get empty spaces or weird boxes instead of the wanted characters, please contact us so we update the font atlas.

Example
In THIS example mod we will assume that you added a file named MyLanguageFile.lang to the assets folder of your mod. After your *.lang file is ready, the last thing to do is to create two *.json files inside the content folder of your mod.

The 1st file represents the language itself. It is used by the game to find out that there is a new language to show in the settings screen. The format is as follows:

{ "type": "ProjectAutomata.Language", "object": { "name": "MyLanguage", "keycode": "my-language-key-code", "displayName": "My Language" } }

The field type cannot be changed. The field name is not displayed in game but it is important and should take note of what you put in there. The field keycode is currently unused but represents the key code of the language, for example en-US. The displayName field is what appears in the Main Menu. It is advised to use the language name as native speakers of that language would write it.

Once you are done with your language *.json file there’s one last thing we need to do. We need to tell the game that for this language it should use the *.lang file you created earlier. To do so we need to create a new *.json file inside the content folder of your mod. The format of this new file file has to be the following:

{ "type": "ProjectAutomata.LanguageData", "object": { "language": "MyLanguage", "data": "MyLanguageFile" } }

As always with RoI Content Creation the type field cannot be changed.

The "language" field has to be set to the name of your language. This name is what you put in the name field of the ProjectAutomata.Language asset you created earlier. Make sure you don’t use displayName by mistake.

The "data" field is the name of your *.lang file without the *.lang extension. In our case we create a file named MyLanguageFile.lang so we are using MyLanguageFile as the value of the data field.

When done, upload the mod to the Workshop. To know how, read THIS part of the main guide.

And that’s it! Run the game, make sure to enable your new mod in the Mod Manager window from the Main Menu, and restart the game. Now in the settings screen under the Gameplay section you should be able to select your new language.