The Trainz community stretches right round the world and Trainz fans speak many different languages. An asset that is only available in one language will see only limited use. It will generally only be used widely by the section of the community that speaks the same language that the asset has been created in.
Trainz allows content creators to make assets that support multiple languages. Creators can provide as many or as few languages as they like. The only rule is that English must be supported as it is the fall-back language that Trainz will use if the asset does not support the correct localised language.
Not everything needs to be translated. We expect things that are part of the interface (Session instructions, HUD rules, Tooltips in the cab, etc) to be capable of being translated into the users local language, but we don't expect in-game scenery to change languages. Scenery should remain as it is in real life, in the language used in the region the route is representing. Text seen within the scene, (e.g. on road signs, station name-boards) is not expected to change languages.
We routinely add translations to many assets when they become built-in to a Trainz product. We may also add translations to other assets in future, including popular assets on the Download Station. We have an established process for adding translations which doesn't need content creator involvement, but that only works if the assets are set up to expect to be translated later; when we hit one that isn't, it can cause big problems.
In particular, please don't put non-English text in the English language fields. That is considered an error, albeit one that is not currently detected by Content Manager. To assist creators in making assets correctly, the English fall-back feature is disabled for your own assets under development. If you are making assets in a version of Trainz that is running in German, we expect you'll want to write your first set of strings in German, and you should do so in the German language containers (username-de, description-de and string-table-de). You will also need to add an English translation to your asset in the English tags.
If you as a creator don't have sufficient English to translate your asset into English, then you'll need to seek assistance from someone else in your local Trainz community who can help. Try asking in a language specific Trainz forum. If you can't find anyone to help, then even an automated translation (e.g. from Google Translate) would be a better alternative than not providing a translation.
Most basic assets need only a 'username' and 'description' tag with localised text. These unqualified tags are the English versions. You don't need to do anything special other than making sure you provide reasonable English language strings. If you wish to provide foreign language strings as well, provide them in relevant country coded versions of these tags. French strings should be provided in 'username-fr' and 'description-fr' tags.
More advanced assets will include additional strings. These should all be put in a 'string-table' container. If the game is running in Russian, 'string-table-ru' is used. Strings that are not available in the localized string table will normally be loaded from the English string table. Best practice is to make a complete translation of the string table container when translating an asset.
Translating HTML files
Many parts of the game interface use our cut-down version of HTML with a number of custom extensions. One of those custom extensions allows strings to be loaded from the string table to the in-game HTML browser. This mechanism should be used any time HTML is to be displayed in-game, including with the 'display HTML pages' rule commonly used for session instructions.
Use the 'locale' extension of the 'font' tag as follows:
This will insert the value of the tag 'string-table-entry-name' into the HTML at this point.
This means that the HTML file itself merely contains the layout of the HTML page, and all the text is loaded from the config file. So the HTML file will appear pretty sparse once finished.
One thing to specifically avoid is making images with text in them. This was popular for session instructions very early on in Trainz history, and was an absolute pain to deal with when it came time to translate. Please don't do this.
Trainz allows content creators to make assets that support multiple languages. Creators can provide as many or as few languages as they like. The only rule is that English must be supported as it is the fall-back language that Trainz will use if the asset does not support the correct localised language.
Not everything needs to be translated. We expect things that are part of the interface (Session instructions, HUD rules, Tooltips in the cab, etc) to be capable of being translated into the users local language, but we don't expect in-game scenery to change languages. Scenery should remain as it is in real life, in the language used in the region the route is representing. Text seen within the scene, (e.g. on road signs, station name-boards) is not expected to change languages.
We routinely add translations to many assets when they become built-in to a Trainz product. We may also add translations to other assets in future, including popular assets on the Download Station. We have an established process for adding translations which doesn't need content creator involvement, but that only works if the assets are set up to expect to be translated later; when we hit one that isn't, it can cause big problems.
In particular, please don't put non-English text in the English language fields. That is considered an error, albeit one that is not currently detected by Content Manager. To assist creators in making assets correctly, the English fall-back feature is disabled for your own assets under development. If you are making assets in a version of Trainz that is running in German, we expect you'll want to write your first set of strings in German, and you should do so in the German language containers (username-de, description-de and string-table-de). You will also need to add an English translation to your asset in the English tags.
If you as a creator don't have sufficient English to translate your asset into English, then you'll need to seek assistance from someone else in your local Trainz community who can help. Try asking in a language specific Trainz forum. If you can't find anyone to help, then even an automated translation (e.g. from Google Translate) would be a better alternative than not providing a translation.
Most basic assets need only a 'username' and 'description' tag with localised text. These unqualified tags are the English versions. You don't need to do anything special other than making sure you provide reasonable English language strings. If you wish to provide foreign language strings as well, provide them in relevant country coded versions of these tags. French strings should be provided in 'username-fr' and 'description-fr' tags.
More advanced assets will include additional strings. These should all be put in a 'string-table' container. If the game is running in Russian, 'string-table-ru' is used. Strings that are not available in the localized string table will normally be loaded from the English string table. Best practice is to make a complete translation of the string table container when translating an asset.
Translating HTML files
Many parts of the game interface use our cut-down version of HTML with a number of custom extensions. One of those custom extensions allows strings to be loaded from the string table to the in-game HTML browser. This mechanism should be used any time HTML is to be displayed in-game, including with the 'display HTML pages' rule commonly used for session instructions.
Use the 'locale' extension of the 'font' tag as follows:
Code:
<font locale=generic>string-table-entry-name</font>
This will insert the value of the tag 'string-table-entry-name' into the HTML at this point.
This means that the HTML file itself merely contains the layout of the HTML page, and all the text is loaded from the config file. So the HTML file will appear pretty sparse once finished.
One thing to specifically avoid is making images with text in them. This was popular for session instructions very early on in Trainz history, and was an absolute pain to deal with when it came time to translate. Please don't do this.