Lade...
 

Texts in Simutrans

Translation and Textslink


This is the formatting instructions linked from SimuTranslator and is a guide to translating the texts in Simutrans



Simutrans can be used with a lot of languages, each denoted by the International language code (two letters, such as en for English or de for German). The texts are held in several places, usually program texts (or base texts or in-code texts) and separate text files.

When you download your own copy of Simutrans you can find and change those texts, but this will only apply to your installation. This is good for testing, but you should consider passing your translations back so they can be used by the rest of the Simutrans community. If you play Simutrans over a Network, you might not have permission to edit the texts.

Before you startlink

Please read the Simutrans Translation Rules so you don't break Simutrans; texts must exist in a specific format.

Read the Technical explanation if you wish to understand how texts are used in Simutrans (for a developer).

It would also help if you played Simutrans for a while so that you understand how a piece of text appears in the game.


Additional information / Tips for Translatorslink

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 building the code. You can also update your translations by downloading the latest translations and saving them in your game files.

The entry page for the SimuTranslator is translator.simutrans.comlink-external. Without an account there, you aren't granted access to all functions, but you can enter 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 forum.simutrans.com/index.php?board=41.0link-external.

What do I translate?link

There are two answers to this that eventually give the same result: everything!

Play Simutrans and look at the text shown on the screens. If you are not happy with what is shown you can change that. This quickly checks the common texts but might take a while before you have checked everything.

Browse the text files; see below for locations. This quickly presents you with all the texts but it might take a while before you understand the context in which it appears in the game, so it might not look right. Browse your text files, or browse using SimuTranslator.

How do I translate?link

The types of files are explained below. Just open them and edit them to test the results in your own game installation. When you are happy that they display correctly, use the SimuTranslator site to make those changes available to others.

If you use Windows, don't use Microsoft WORD (it can automatically change characters to be unreadable in Simutrans) but try Notepad, Wordpad or a third party editor. When you save the file, it must be saved as a text file. Again be careful if using Windows; some settings can cause the file to be saved as en.tab.txt with the txt ending hidden. It will look like en.tab but will not work in Simutrans. In older versions of Simutrans the line breaks had to be Unix style, but Windows line breaks are now acceptable (from version 102.2).

To translate properly, you need to understand the actual meaning in the context of the game, 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 / reading the program, or you can read forum announcements and discussions regarding (new) features, their use and Simutrans's internal behaviour.

Top

Program and Pak textslink

These are held in two files named <language code>.tab, such as de.tab or en.tab, and are held in simutrans/text (program or base texts) and simutrans/<pakset>/text (pak texts), such as simutrans/pak64/text.

To change your copy of these files, open them in a text editor. Remember that each text is in a pair; the first line is the in-code text (changing this will mean you lose the translation of it, as it must match the text used in the code), and the second line is what is shown in the game (change this).

The character sequence \n is used for a line break; check the text fits in the space allowed. A line that starts with a # is a comment line, and is ignored by the program.

Top

Addon textslink

Addons extend the functionality of simutrans and can include translation texts; these are additional files stored in simutrans/addons/<pakset>/text/<name>_<language>.tab, such as simutrans/addons/pak64/text/food_de.tab.

These files are edited in the same way as Program texts. They are also line pairs, with the first being the in-code text and the second being the translation.

Top

Factory textslink

Texts describing Factories are shown when the user clicks the Details button on the factory information screen. These are held in the Pak text file <language code>.tab in the simutrans/<pakset>/text directory, where the in-code text is factory_<factory name>_details. The translation for these accepts a selection of HTML elements. This text does not use \n line breaks, nor does it allow # comments.

These HTML elements can be used:


Element
Display
Meaning
<title>Text</title>   the window title
since version 121.0.0 
  the detail text is now in a tab. The text specified with <title> is no longer displayed anymore.
<h1>Text</h1>
Text
  underlined text (heading)
<strong>Text</strong>
Text
  red text
<em>Text</em>
Text
  white text


Top

Help textslink

These are shown when the player clicks the "?" button at the top of any window. They are held in simutrans/text/<language code>, such as simutrans/text/en as one plain text file per window. Do not change the filename or you lose the translation of it, as it must match the name used in the code. Edit the text, using the allowed formatting and save it.

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


Top

Text formatslink

To insert dynamic values into output-strings, Simutrans uses these C-style placeholders (see printf()link-external) in the text (they may include additional formatting options):
  • %s for strings
  • %d for whole numbers
  • %f for floating-point numbers
  • %c for single characters

These MUST be used in a translation with the same type, order and meaning as the original text. However, if the translation is in a language that uses a different sentence structure this may cause problems with the translation.

Please take care about the text length so that it fits in the space the program has allowed for it. If you can check that it fits on your game installation, it will mean that it won't need changing again when it is shown on someone elses game. See the Translation rules for style and length information.


Guidelines for translation are found at Simutrans Translation Rules

Top

--

Subpages:
Seite bewerten

Zu dieser Seite haben beigesteuert: Andarix , Makie , Frank , SimonSmall , IgorEliezer und system .
Seite zuletzt geändert: am Freitag September 1, 2023 08:17:43 GMT-0000 von Andarix.

Page discussion

There are no discussions currently on this page Start discussion

Online Benutzer

12 Benutzer (alle) online

Neueste Forenbeiträge