The
Title.txt component can be used in scenarios and object folders to define the title for each language.
Each line has a language abbreviation bevore the title. For example:
DE:Angriff der Killerwipfe
US:Attack of the Killer Wipfs
In external language packs the Title*.txt should be at the corresponding directory position (whereas * is replaced with the used language abbreviation), which can contain the title for that language. Here is an example for a TitleFR.txt:
FR:Les wipfes moerderesque attaquent
If an entry for the choosen language is present, the Title entry from the
Scenario.txt is replaced by the corresponding name.
Important: No quotation marks and special characters should be used.
In order to insert language-dependant tests into scripts, so-called string tables are used. Instead of the text, only references to it should be inserted into the script. The references are searched in the string table, which should be placed in the same folder as the referencing script and named StringTbl*.txt (where * must be substituted by the language code).
The reference in the script is composed of a name for the string (string-ID), surrounded by dollar signs ("$").
For example:
protected func Activate(pCaller)
{
[$DescActivate$]
Message("$MsgYourPosition$ %d / %d", GetX(pCaller), GetY(pCaller));
}
In this case, two strings with the names "DescActivate" and "MsgYourPosition" are being inserted.
An appropriate StringTblDE.txt (for German language) could look like the following:
# Beschreibungstexte
DescActivate=Position bestimmen
# Nachrichten
MsgYourPosition=Deine Position ist:
In this object the Activate function has the description "Position bestimmen". Executing it yields a message "Deine Position ist: 252 / 352". The string table also contains two comments starting with a '#'-sign. Those are ignored.
For the sake of completeness, here is a suitable StringTblUS.txt:
# Description texts
DescActivate=Tell position
# Messages
MsgYourPosition=Your position is:
This would yield the message "Your position is: 252 / 352", if English language were selected.