Originally, all the messages and strings in Train Director were in English.
This was because English is the most used language in the world, and because
it's the only language that I know beside Italian.
Starting from version 1.19, Train Director allows the use of the program to people who don't speak English. This is possible through the contribution of other users who know both English (or Italian) and another language, and that have had the time and patience of translating the program's messages in their own mother tongue.
The languages currently available are:
- Italian - translated by myself
- Hungarian - translated by Imre Baranyi.
- French - translated by Claude Marani and Roland Wagener.
- Spanish - translated by Antonio Roa López.
At the moment it is not possible to select the desired language from within
the program. To replace English with another tongue, (if available), it's
necessary to manually copy a file in the C:\ directory. The localized files have
the name "traindir.XX", where XX is the 2-characters international country code.
These files are included in the .zip file containing the Train Director
executable, and thus are automatically extracted in the same directory as the
So, if one wants Train Director to use Italian messages, one must copy the file "traindir.it" in the C:\ directory with the command:
COPY traindir.it C:\In addition to copying the file with the translated messages, it is necessary to tell Train Director to use that file. To do this, make sure to have the following line in the C:\Temp\tdir3.ini file:
locale .itOf course, if you want to use another language, you'll need to put a different country code in place of .it.
How to Localize Train Director
Included in the .zip file is a text file ending in .it. This file contains the list of all the English strings used by the program, and the translation of each string in Italian. The format of the file is: The English string must be separated from the translated string with the two characters @@. For example:
English @@ Italiano Restart @@ Riparti
Whoever wants to translate the messages into another language, for example Hungarian, should make a copy of the file into the C:\ directory and change its extension. For example
COPY traindir.it C:\traindir.hu
Then one needs to change all the strings to the RIGHT of the @@ into the new language. It is important that the English version of the string be left unchanged. This is because it must match, character by character, with the corresponding string compiled into the program. If the English string matches the one that the program is about to print, the program will use the string on the right of the @@ characters. To split a string in two lines, use the characters \n. For example:
First line\nSecond line @@ Prima linea\nSeconda linea
Some lines have %s or %d sequences. It's very important that these sequences appear in the same order in the translated text. For example:
Signal %s at coordinates %d,%d @@ Segnale %s alle coordinate %d,%d
This requirement may prevent the translation of these strings into those languages, like Japanese or Korean, that use a different order for nouns and verbs. Hopefully no European language has the same characteristic. Another limitation is that only the ISO/ANSI character set is supported (no Unicode etc.)
To select different languages, one has to add/change one line in the file C:\temp\tdir3.ini. The value of the "locale" line selects the extension of the language file that will be used. For example to select the traindir.hu file, make sure that the "locale" line in the C:\temp\tdir3.ini looks like:
In a future release I will make possible to change the locale from within the program. For the time being, this change must be performed with a separate text editor.
I will be happy to include localized files in different languages in the standard distribution of the program.
This page is maintained by email@example.com
(Remove the _ before sending your message.)
Created on: February 2, 2004