Translation and Texts
Simutrans can be used with a lot of languages. But some languages haven't been translated completely yet, and due to continuous development of the program and paks being added by many people, translations need to be frequently updated and enhanced.
Technical Background
The texts used in Simutrans are distributed over several files and folders. The program has its own output texts, called base texts, and each pakset also provides texts (e.g. road types, signal types, building names), called <pak-name> texts. Both kinds of internal texts can come in only one language (mostly English nowadays, but a lot are in German, due to the program's origin), and may not be nicely formatted, or up-to-date regarding their actual meaning within context.
These texts (technical name is strings, another name is text elements) need to be replaced by the language that the player wants to use (even if it is English or German), which is done by using the mapping (from internal texts to a certain language) contained in <language code>.tab - one file for the base texts (in simutrans/text), one for the pak texts (in simutrans/<pak-dir>/text).
To insert dynamic values into output-strings, Simutrans uses C-style placeholders like (see printf()
) in base texts:
- %s for strings
- %d for whole numbers
- %f for floating-point numbers
- %c for single characters
etc. (they may include formatting options). These have to be used in translation with the same type, order and meaning.
Help texts
The English help texts can be found in the folder simutrans/text/en. These are plain text files, that support a small set of HTML-syntax.
Element |
Show |
Meaning |
|---|---|---|
| <title>Text</title> | is the window title | |
| <h1>Text</h1> | Text |
underlined text (heading) |
| <strong>Text</strong> | Text |
red text |
| <em>Text</em> | Text |
white text |
| <it>Text</it> | yellow text shadow | |
| <br/> | line break | |
| <p>Text</p> | paragraph | |
| <a href="file.txt">Text</a> | Text |
link to another help file |
Program texts
The application texts can be found in the folder simutrans/text. The file containing the English texts is called en.tab.
The files are built up by doubleline sets and use Unix line breaks.
On the first line is given the tag that is used in the game. On the second line is given the text that should be shown to the user.
The character sequence \n is used to mark a line break.
A line that starts with # is a comment.
The program texts are translated with SimuTranslator.
Pakset texts
Pakset texts can be found in the folder simutrans/[PAKSET]/text. The file containing the English texts is called en.tab.
The files are built up by doubleline sets and use Unix line breaks.
On the first line is given the tag that is used in the game. On the second line is given the text that should be shown to the user.
The character sequence \n is used to mark a line break.
A line that starts with # is a comment.
The program texts are translated with SimuTranslator.
Factory texts
The pakset texts describing the factories (factory_[factory_name]_details) are special in that they do not support line break by the character sequence \n, instead the text must be structured by using the HTML elements <br/> (line break) and <p> </p> (paragraph).
Furthermore these HTML elements can be used:
Element |
Display |
Meaning |
|---|---|---|
| <title>Text</title> | the window title | |
| <h1>Text</h1> | Text |
underlined text (heading) |
| <strong>Text</strong> | Text |
red text |
| <em>Text</em> | Text |
white text |
Addon texts
Text for addons can be placed in additonal tab files.
The files are built up by doubleline sets and use Unix line breaks. The file names must be given a name starting with the language prefix (for English en_) and be placed in the folder simutrans/[PAKSET]/text.
On the first line is given the tag that is used in the game. On the second line is given the text that should be shown to the user.
The character sequence \n is used to mark a line break.
A line that starts with # is a comment.
Information/Tips for Translators
SimuTranslator is the web application that is used to translate Simutrans texts from the origin ("master") language into the different languages. The entries are stored in a SQL database, from which the .tab files are generated and downloaded when assembling a pakset. The entry page for the SimuTranslator is http://simutranslator.simutrans-germany.com/. Without an account there, you aren't granted access to all functions, but you can enter so-called suggestions, which can easily be "promoted" to official translations. Accounts may be requested from prissi at the forum.
The forum board for translation issues/questions is http://forum.simutrans.com/index.php?board=41.0
.
To translate properly, you need to find out the actual meaning in context, not just translate the isolated internal or master text. For most pak objects, you can look at the objects' properties and pictures in SimuTranslator, but for base texts, you may need to find the text in use, and understand its meaning by using the program, or you can read forum announcements and discussions regarding (new) features, their use and Simutrans's internal behavior.
To see the internal texts in the game itself (so you can look for them in .tab files and SimuTanslator), create a file simutrans/text/zz.tab (important: with Unix-style linefeeds: '\n' = LF), containing only these lines (you can, of course, exchange the separator definitions):
ZZ_System PROP_FONT_FILE Prop-Latin1.bdf SEP_THOUSAND . SEP_FRACTION ,
Guidelines for translation are found at Simutrans Translation Rules
Contributors to this page: Susanna
and
Frank (Admin)
.
Page last modified on Monday 23 August 2010 23:37:04 CEST by Susanna
.
-
wiki page:
-
Short overview on how to create Addons -
en_blender -
How to define a bridge -
Settings in the DAT-files of traffic routes -
How to compile Simutrans yourself from source code -
About texts in Simutrans and how to translate them -
es_Texts -
fr_Texts -
el_Texts -
pt_Texts -
Extending the Simutrans object repository with addons -
fertige Addons installieren -
rund um Texte in Simutrans -
Hur Simutrans kan tala svenska -
the Parameters BackImage/FrontImage and Dims
-
- file gallery:
Post new comment