Translation

From Simutrans Wiki

Jump to: navigation, search

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 Simutrans program has its own output texts, called base texts, and each pak set 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.

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 pak set. The entry page for the SimuTranslator is http://translator.simutrans.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.

The forum board for translation issues/questions is http://forum.simutrans.com/index.php/board,27.0.html.

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 ST´s internal behaviour.

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
,

Personal tools