Text Translator Utility

Hastur

Chieftain
Joined
Nov 26, 2001
Messages
51
I created this mostly for my own use but thought I'd share. Using VB.NET, I wrote a small utility that allows me to enter an English string and click a button. It then contacts Babelfish (on AltaVista) and translates the text into French, German, Italian, and Spanish. Then it takes the translated text and replaces all of the non-English characters with the encoded string for that character as required by the Civ4 XML files. And just to make life a little easier, paragraph breaks are automatically adjusted to use the [PARAGRAPH:1] tag.

Lastly, to copy the translated text, just click the "Copy" button by the desired string and it'll be pasted into your clipboard ready to be dropped into an XML file.

You will need the .NET Framework installed for this application to work.

Here's a screenshot and the file to download (with source):


So no more reason to not include translated text in our mods, guys...
 

Attachments

  • Translator.jpg
    Translator.jpg
    102.1 KB · Views: 1,294
  • Civ4Translator.zip
    Civ4Translator.zip
    280.4 KB · Views: 810
Hastur said:
I created this mostly for my own use but thought I'd share. Using VB.NET, I wrote a small utility that allows me to enter an English string and click a button. It then contacts Babelfish (on AltaVista) and translates the text into French, German, Italian, and Spanish. Then it takes the translated text and replaces all of the non-English characters with the encoded string for that character as required by the Civ4 XML files. And just to make life a little easier, paragraph breaks are automatically adjusted to use the [PARAGRAPH:1] tag.

Lastly, to copy the translated text, just click the "Copy" button by the desired string and it'll be pasted into your clipboard ready to be dropped into an XML file.

You will need the .NET Framework installed for this application to work.

Here's a screenshot and the file to download (with source):


So no more reason to not include translated text in our mods, guys...


Correct me if I am wrong, but isn't babelfish free? As in it is a library you can use with your program, instead of contacting an outside server?
 
You know that the babelfish translations are often horribly mangled, right? I suppose it's better than nothing, but asking babelfish to do your translations for you is like handing your dog a pen and asking him to do your homework for you.
 
Babelfish is a free online service yes... http://babelfish.altavista.com/

However, unless you buy the Systran software it's based on, there isn't a free counterpart for disconnected use. And partially because the app I wrote uses an online connection I released the source code so folks could see just what it's communicating.

The main benefit I found was speed. I've put in text around 20,000 characters in length and had it return back all four translations reformatted for use in the Civ4 XML files in about 5-10 seconds. Doing that same process manually used to take me about 30 minutes for that length of text. Even simple things like unit names would take several minutes to get the special characters fixed.

And definitely very glad that others are finding this app useful!
 
Yeah, every Machine Translation service or application is going to give the rendered text a bit of a mangling. But given that just about every mod I've downloaded doesn't even have placeholder text for non-English languages, I figured that "text that read like made by Tarzan" is a LOT better than an empty string. Human translation is FAR better than the current state of the art but machine translation is also FAR better than nothing at all.
 
Hastur said:
Human translation is FAR better than the current state of the art but machine translation is also FAR better than nothing at all.

Good point. I didn't mean to belittle your work, of course. It's a great idea. I just happen to be a translator, and babelfish gives me the heebie jeebies.

:D
 
If u want I can test the italian translation.
(But u have to do the same thing before with my english :D)
If I could help you...
 
I find in my translation work (purely academic) that one must depart from exact translation much of the time in order to produce something that is even remotely like the language its going into.

Certain things, directly translated, just do any except the best of which is done, doingly.

This is how most of my homework ends up.
 
I modified this conveinent translation tool.
Rather than translating all lanuage at once, I perfer one language at a time.
The translated text may be edited and checked again by re-translating the text back to English. Source text may be fetched from clipboard.
You will need the .NET 2.0 Framework installed for this application to work.
Program and modified souce code (VB 2005) included.
 

Attachments

I'll only talk about french translation.
With this tool, you don't get the real translation. But you have the general sense. Then, human translator just have to rebuild sentences to have the good text. I think I'll use this tool for my future French translations.
:goodjob:
The good way (that's what I think), is to add to mods the texts translated with this tool, and then, to find a human translator to clean translations...
 
Back
Top Bottom