Translating the new GRF files to other languages

Get help, info, news and advice about the Transport Tycoon Deluxe patch.

Moderator: TTDPatch Moderators

Post Reply
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Translating the new GRF files to other languages

Post by Patchman »

In beta 1, I've had to abandon the possibility of including ship names into the patch, and thus also setting ship names via ttdpttxt.dat.

This means that in beta 1, it wasn't possible to translate the vehicle names.

However, I've implemented a new mechanism that works in beta 1. To translate any of the new graphics sets, you need to download GRFTrans from http://www.ttdpatch.net/src/grftrans.zip

Then you run it from a command line like this:

Code: Select all

grftrans dbset.grf
This will make dbset.txt, a file with all the vehicle names. Then you translate the vehicle names. You can also specify a different output text file:

Code: Select all

grftrans -o dbset_it.txt dbset.grf
to make dbset_it.txt instead. By default, the vehicle names for the American version are shown as a base for translation. You can choose a different language to translate from with

Code: Select all

grftrans -l 1 dbset.grf
where the -l ("ell", for "l"anguage, not "one"!) option specifies the version: 0=american, 1=english, 2=german, 3=french, 4=spanish. Just pick whichever is easier to read for you.

Once you've translated all the text strings there, you then run grftrans again, now on the text file:

Code: Select all

grftrans dbset.txt
This will make dbset_trans.grf, which is a new .grf file that overrides the vehicles names of the dbset. It does this if and only if the dbset is loaded and active. Therefore it is safe to put this translation grf file in your newgrf(w).cfg in any case. However, it must be listed *after* the dbset, otherwise the dbset will simply override the names again :)

Of course you can also choose a different output filename:

Code: Select all

grftrans -o dbset_dk.grf dbset.txt
NOTE 1: The DOS version of TTD cannot deal with filenames longer than 8 characters, so you would have to rename dbset_trans.grf so, for example, dbset_tr.grf to make it work.

NOTE 2: The generated grf file works for both the DOS and Windows version, because it only contains the names, and not any graphics that might need to different.

I haven't tested this a whole lot, but it worked with the dbset. Please let me know of any error, problems or other difficulties you find using this program or the translated .grf files.

[note to mod: don't make it sticky, I'll just link to this thread from the new graphics thread...]
Post Reply

Return to “General TTDPatch”

Who is online

Users browsing this forum: No registered users and 6 guests