Asset Translation

TrainzDev

New member
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:
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.
 
I agree with 90% of The above. One thing though. Suggesting using an automated translator isn't a good idea. I abandoned using the Polish version of Trainz one day because reading the names of assets (builtin ones!!!) translated into my language was a complete disaster (the translations are completly not understandable, or I smoke to less ;-). I don't mean the translations are not 100% good. They often lead to completly, completely different conclusions! For example 'track' is translated to 'song' (but in Polish). And the situation is in 70% of builtin assets...). So The advise is not to use online translators AT ALL.


And one more thing. Forcing people to use many languages isn't a good idea, either. You'd better check if people uploading stuff to DLS write anything in the description tag (and in English being an international language). There are plenty of assets with no description or with description in a national language. When an asset name tells you nothing and there is no description (not to
mention a suggestive screenshot) such thing is junk for me I won't even try to download it. Please also check if the asset is a Real one, not a route consisting of a track circle... Theese are real problem...
 
Last edited:
samplaire;bt3145 said:
I agree with 90% of The above. One thing though. Suggesting using an automated translator isn't a good idea.

You are correct - an automated translator is the worst option for translation. That's why I've suggested finding a helpful human first. It is, however, strictly better than writing a foreign language in the English string, or not writing any English at all.

Please note that I am not suggesting you need to translate to any language other than English - if you don't know a non-English language, then simply don't provide it. Trainz knows to fall back to English if a local translation isn't available. The point is that's not a valid strategy for the English translation, and providing a non-English string is considered an error.

I abandoned using the Polish version of Trainz one day because reading the names of assets (builtin ones!!!) translated into my language was a complete disaster (the translations are completly not understandable, or I smoke to less ;-). I don't mean the translations are not 100% good. They often lead to completly, completely different conclusions! For example 'track' is translated to 'song' (but in Polish). And the situation is in 70% of builtin assets...).

Interesting. The translations for the localised versions of the game are provided by the local publishers. They aren't machine translated. This needs to be raised with the publisher...

And one more thing. Forcing people to use many languages isn't a good idea, either.

We aren't. We only require that creators provide English. You may optionally provide any other languages you want - as many or as few as you know.

You'd better check if people uploading stuff to DLS write anything in the description tag (and in English being an international language). There are plenty of assets with no description or with description in a national language.

Yes, this is a problem. However, writing an accurate language identifier is a complex problem - and I'd much rather we spent our time writing game features, rather than adding ever more complex error checking to CM to find assets which look like they have English fields in the wrong language. But if necessary, we will do just that...
 
Thank you for the explanation! It's fair then :)

Me I always try to ask English native speakers for a proper name. Sometimes a discussion opens because there are differences between Aus, USA, UK and this is really interesting :)

As for the Polish translation - I don't mean the program itself being badly translated. It is in fact ok. I mean the builtin content. And AFAIK this depends on the authors.
 
samplaire;bt3147 said:
I mean the builtin content. And AFAIK this depends on the authors.

The built-in content is typically localised by our publishers in the specific locale, along with the rest of the game.

chris
 
samplaire;bt3147 said:
Me I always try to ask English native speakers for a proper name. Sometimes a discussion opens because there are differences between Aus, USA, UK and this is really interesting :)

This is an interesting point worth discussing. Regional differences exist in many languages (not just between the English, American and Australian variants of English), and railway terminology can even change between railway companies.

Trainz only supports one version of each language. Given we don't make a distinction between subtypes of the same language (let alone between each different railway company), when you hit an issue like this you'll have to pick the most appropriate one. If the object is of American origin, then it makes sense to give it a name using the American term. If it's British, then use the British term.
 
Back
Top