View Full Version : Text Translator Utility


Hastur
Nov 29, 2005, 10:35 AM
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...

Karam
Nov 29, 2005, 02:45 PM
Great, thanx. A must-have for every modder.

Hastur
Nov 29, 2005, 02:47 PM
My pleasure. Let me know if you see anything that needs enhancement in it and I'll give it a shot.

ZabMilenko
Nov 29, 2005, 10:56 PM
Two thumbs up :-)

MrC
Nov 30, 2005, 01:32 AM
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?

Suho1004
Nov 30, 2005, 07:58 AM
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.

Hastur
Nov 30, 2005, 07:58 AM
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!

Hastur
Nov 30, 2005, 08:19 AM
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.

Suho1004
Dec 01, 2005, 06:18 PM
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

Hastur
Dec 01, 2005, 09:04 PM
My apologies then. I can imagine it would be like an author reading a book written by a computer program. We're on the same page then. Human translation is ALWAYS better than machine translation and I suspect that will be the case for a long time to come.

Suho1004
Dec 02, 2005, 03:52 AM
Human translation is ALWAYS better than machine translation and I suspect that will be the case for a long time to come.

I sure hope so, otherwise I'll be out of a job! ;)

Mylon
Dec 07, 2005, 06:51 PM
I just downloaded this and maybe I'll get around to updating my mod for different languages to make it more accessible.

Tauro
Dec 12, 2005, 12:27 PM
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...

Hastur
Dec 12, 2005, 06:14 PM
I'm just glad that the app is of use although I'll be interested to hear what people think of the resulting translated text.

jpinard
Dec 13, 2005, 12:10 AM
Wow, excellent job Hastur!

Gr3yHound
Dec 14, 2005, 12:18 PM
as we all know, without brainwaves the babelfish does no propper job ;)

jlocke
Mar 07, 2006, 04:14 PM
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.

SimCutie
Apr 05, 2006, 09:16 AM
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.

Fabrysse
Oct 18, 2006, 03:51 AM
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...

rockinroger
May 20, 2008, 03:34 PM
Any chance this could be updated since babelfish is now owned by yahoo?

JEELEN
May 22, 2008, 05:27 AM
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.

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...

Computers can't translate, because there's very little to compute about language; most words derive their meaning from context. (Unlike with chess, for instance, which is highly mathemathical.) Even the basics of grammar and syntaxis are hard to transfer to anyone who doesn't have a feeling for language. If you had no understanding of another language, you'd get just as far with a dictionary.

Any chance this could be updated since babelfish is now owned by yahoo?

Babblefish might be a better name - I wouldn't get my hopes up anyway, as the last update is from April, 2006.