1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Text Translator Utility

Discussion in 'Civ4 - Utility Programs' started by Hastur, Nov 29, 2005.

  1. Hastur

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

    Attached Files:

  2. Karam

    Karam Chieftain

    Joined:
    Oct 1, 2005
    Messages:
    92
    Great, thanx. A must-have for every modder.
     
  3. Hastur

    Hastur Chieftain

    Joined:
    Nov 26, 2001
    Messages:
    51
    My pleasure. Let me know if you see anything that needs enhancement in it and I'll give it a shot.
     
  4. ZabMilenko

    ZabMilenko Warlord

    Joined:
    Apr 22, 2004
    Messages:
    106
    Location:
    Medford, Oregon
    Two thumbs up :)
     
  5. MrC

    MrC Chieftain

    Joined:
    Nov 18, 2005
    Messages:
    92

    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?
     
  6. Suho1004

    Suho1004 Warlord

    Joined:
    Sep 1, 2004
    Messages:
    207
    Location:
    South Korea
    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.
     
  7. Hastur

    Hastur Chieftain

    Joined:
    Nov 26, 2001
    Messages:
    51
    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!
     
  8. Hastur

    Hastur Chieftain

    Joined:
    Nov 26, 2001
    Messages:
    51
    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.
     
  9. Suho1004

    Suho1004 Warlord

    Joined:
    Sep 1, 2004
    Messages:
    207
    Location:
    South Korea
    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
     
  10. Hastur

    Hastur Chieftain

    Joined:
    Nov 26, 2001
    Messages:
    51
    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.
     
  11. Suho1004

    Suho1004 Warlord

    Joined:
    Sep 1, 2004
    Messages:
    207
    Location:
    South Korea
    I sure hope so, otherwise I'll be out of a job! ;)
     
  12. Mylon

    Mylon Amateur Game Designer

    Joined:
    Nov 4, 2005
    Messages:
    1,013
    I just downloaded this and maybe I'll get around to updating my mod for different languages to make it more accessible.
     
  13. Tauro

    Tauro Warlord

    Joined:
    Nov 20, 2005
    Messages:
    251
    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...
     
  14. Hastur

    Hastur Chieftain

    Joined:
    Nov 26, 2001
    Messages:
    51
    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.
     
  15. jpinard

    jpinard Martian

    Joined:
    Jan 18, 2002
    Messages:
    760
    Location:
    Enceladus, Saturn
    Wow, excellent job Hastur!
     
  16. Gr3yHound

    Gr3yHound Mr.MapView

    Joined:
    Mar 30, 2004
    Messages:
    395
    as we all know, without brainwaves the babelfish does no propper job ;)
     
  17. jlocke

    jlocke Cold Warrior

    Joined:
    Feb 8, 2006
    Messages:
    221
    Location:
    University of Chicago
    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.
     
  18. SimCutie

    SimCutie Warlord

    Joined:
    Dec 10, 2005
    Messages:
    197
    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.
     

    Attached Files:

  19. Fabrysse

    Fabrysse Charming-snake learner

    Joined:
    Sep 11, 2006
    Messages:
    430
    Location:
    Toulouse - France
    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...
     
  20. rockinroger

    rockinroger WoC Team Member

    Joined:
    Feb 6, 2006
    Messages:
    1,312
    Location:
    Overland Park, Kansas
    Any chance this could be updated since babelfish is now owned by yahoo?
     

Share This Page