From Serious Sam Wiki
Revision as of 02:52, 5 November 2012 by AlenL (Talk | contribs)

Jump to: navigation, search

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.

File Format

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:

0_01_CairoSquare.Name=Summer in Cairo
Simulation.UnableToLoadDamagedGame=Unable to load saved game.\nSaved game appears to be damaged.
DeathMessage.HarpyPunch=%1 was beaten by a Scythian Harpy.
ObjectActionMessage.UseButtonToEnter=Press {plcmdUse} to enter

This file is a normal text file in UTF-8 encoding and you can open it in most modern text editors.

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! A recommended free application that can handle it correctly is Notepad++

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.

Table Contents

Each line of the file specifies one string, and consists of the following elements:

  1. 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!
  2. The equals sign ("="). - Don't touch that either. Don't add spaces before or after it.
  3. 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 Numbers preceded by a percent sign are 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.
{plcmdUse} input bindings Names of input commands inside curly braces are used by the game to insert the current binding for some command into the string. You must make sure that your translated string has exactly the same bindings as the original string, and that you do not change anything in them. Note that this is a slightly older system, and we are trying to phase them out in favor of numeric insertions, but there are still a lot of leftovers in the code.

Location on Disk

Nominally, translation tables are located in the root of localization folder for the corresponding language, in the "Locales/" folder of the current game content. So e.g. English and German folders for Serious Sam 3 are respectively:

Content/SeriousSam3/Locales/enu/ Content/SeriousSam3/Locales/deu/

Note the 3-letter language abbreviations ("enu" and "deu" correspond to "English-US" and "Deutch"). These abbreviations are from Windows Language Table. Please use the appropriate 3-letter code from that table for your language.