This document describes the structure of localization files for Serious Engine games, and how to make your own translations into new languages, or how to edit the existing ones.
Localization in most newer Serious Engine games (from Serious Engine 2.0 onwards), is done via "translation table" files. Such a file bears a .tbl extension and looks like this:
5 0_01_CairoSquare.Name=Summer in Cairo 0_02_CairoMuseum.Name=Into the Spider's Nest Weapon.Minigun=Minigun Simulation.UnableToLoadDamagedGame=Unable to load saved game.\nSaved game appears to be damaged. DeathMessage.HarpyPunch=%1 was beaten by a Scythian Harpy.
This file is a normal text file and you can open it in any text editor, Notepad, or similar.
IMPORTANT: This file must be saved in UTF-8 charset. If it is not, the game won't display special characters like accents, umlauts and similar correctly!
The number in the first row is the number of strings in the file. Normally, when translating to another language, you don't need to touch that. But just that you know that if the file doesn't work correctly, or reports some errors, you should make sure this matches.
Each line of the file specifies one string, and consists of the following elements:
- String identifier - The text to the left of the equals sign ("="). This is what the game uses to find the needed string NEVER translate that!
- The equals sign ("="). - Don't touch that either. Don't add spaces before or after it.
- The actual string contents. - This is everything to the right of the equals sign. This is what you translate.
In the actual string contents, you will sometimes find some strange symbols. Here is what they do:
|\n||newline||Each of these break the text into a new line. If you check your translated text in the game first, and you are _sure_ that it would be better if you change the line breaks, then do it. But in general, you should generally not touch those.|
|%1 %2 %3 ...||inserted elements||This is used by the game to insert some dynamic elements into the string. You must make sure that your translated string has exactly the same inserts as the original string. If you have less or more, the string will not be outputted correctly. You may (and should - if appropriate), change the order of insertion, to match different ordering of words in different language.|