Game Development Community

Langc for TGB (Localization tool)

by Richard McKinney · in Torque Game Builder · 07/25/2006 (11:52 am) · 8 replies

I used this tool for the first time today to start internationalizing a TGB game. It must be built from the source in TGE. I have both TGE and TGB so I was able to do this, but I don't believe that people who only have access to TGB will have access to this tool, and thus can't make easily localizable games, even though support for everything else is in TGB.

#1
07/25/2006 (12:07 pm)
As far as I remember, langc uses Torque Lib. It only uses code from the Torque core, nothing TGE specific. It should be possible to build it using solely the TGB codebase provided you re-create the Torque Lib project.

Note that I havent looked at the langc code since I wrote it a couple of years ago, so I may be misremembering or somebody else may have changed it since :)

T.
#2
07/25/2006 (1:03 pm)
What does this tool actually do? Does it translate english to a certain language, or does it have another function?
#3
07/25/2006 (1:28 pm)
I was curious, so I looked it up. LangC on TDN.

Quote:As there are automatic translation tools available on the web, for example Google and Babelfish, it would be nice to be able to use them to get a head start on translations. Unfortunately, automatic translations are usually very bad and are thus not good for shipping games. However, they can be quite useful for testing purposes or to give human translators a head start.

To this end, I decided to experiment with the Torque localization code and Google. As you will soon see, it was not particularly successful. Despite that, the code remains and this document was written to cover it in the (probably vain) hope that it may be useful some day in the future.
#4
07/25/2006 (1:46 pm)
@Jason,

The automatic translation thing is not langc's purpose, and never was. langc exists solely to compile a language file (e.g. a plain text list of localizable strings and IDs) into a binary format for use by the engine. Think of it like the resource compiler for Windows, except it only deals with string tables. You only need it if you're using the localization code.

Automatic translation was just an idea I had to do automatic translations with online translators. In the process of trying out ideas, I tried a few different things to mark out strings to attempt to avoid them getting munged by the translator. I used langc to process those files because it already had most of the code I needed to do it. I didn't remove the code I added to langc because I thought that at some point in the future somebody might find a use for it.

Perhaps the TDN article is confusing, or this is not what you meant. But I thought I should clear it up :)

T.

Edit: Also, that is not the langc article. This is.

Edit2: I updated the automatic translation article to point to the localization article. There was already a link in the introduction, but it wasnt very clear.
#5
07/25/2006 (10:04 pm)
Right, basically it's a nice little tool to convert .lang files into the .lsos that Torque wants to work with, and gives you a .cs file so you can refer to those strings through their proper textIDs. Just takes a bunch of steps that could be cumbersome otherwise and makes it easy. Not much to it, but the tutorial on internationalization makes use of it, and it helped me understand exactly what the engine was looking for, and is quite easy to use. Thanks for the tool Tom.

While you're almost certainly right about it not referencing tge specific code, the source is not part of the tgb source distribution, leaving tgb users no way to use it (since it must be built from the source which is only distributed with tge). I just thought it would be nice for those without a tge license to still be able to use it for internationalization of tgb games. Unless of course I'm misunderstanding something from having both installed in different locations already.

Thanks Tom.
#6
07/25/2006 (10:30 pm)
@Richard,

Ahh, I get you now, I didn't realise it was missing from TGB. It probably either just got overlooked or there was a good reason for not including it. My bet's on the former, but you never know :)

T.
#7
07/26/2006 (7:50 am)
Thanks for clarifying, Tom.
#8
08/17/2006 (12:16 pm)
So how do we TGB users get langc, if it doesn't use the TGE-specific source? Can it be distributed to us? I'm very interested in this.