Next »

Instant Messengers with Translation built in

23 May 2005

Wouldn’t it be great to have Instant Messengers with built-in translation?

This question kept me up all night last night. So this morning I decided to look for a messenger or utility to do this. Guess what I came up with nothing.

I was thinking why is that? Is it because the majority of people using Instant Messengers are friends talking to each other? So if they were already friends wouldn’t they already speak the same language? Also, what about the accuracy? Word for word a programmatic translation is accurate, but it can often have different meanings and connotations.

Never the less, I want a utility or messenger to have this ability.

So I set out to program a C# Microsoft .NET Windows forms application to post a paragraph to Altavista’s babelfish, then to return the results in another text box. I did this for a testbed prototype to see how easy it is. Turns out, it was really easy! (hip-hip-wooray! for C# and .NET)

After messing with the WebClient library and a few UI niceties. I had a working prototype translation program, using babelfish.altavista.com for the translation.

I then started out on the Microsoft Messenger API’s (they have been a part of MS Messenger and MSN Messenger since the 4.7 days). This API is great, it allows you to enumerate your contacts, see what there status is, and even start a InstantMessenger window. Unfortunately it seems Microsoft never completed the API, or they saw an apparent security risk here, and they stopped short of providing an API to actually send and receive messages with messenger. Perhaps they didn’t like what trillian or some of the other multi-messengers were doing back in 2001, I don’t know if they were using the API anyway. Probably not, especially not GAIM as this one appears to be written for Linux mostly.

Anyway, I have a working prototype translation windows forms application. I am still working with the Messenger APIs a little more, I am playing with some pinvoke stuff to see if I can hook into the messenger window, and SendKeys and also listen for new messages in the history window.

My goal is to have a small application that will allow you to select your language, and the language of the person that you are chatting with. when you it send it will send them the translated text and the original text in parenthesis perhaps:

Tony Says: hallo, wie Sie heute sind? (Hello how are you today?)

Anyway thats my pet project for the week.

On a side note: I have not looked into Messenger Plus much. I will be looking into this next, maybe my application will evolve into a plugin for Messenger Plus. You never know.
I did not search for plugins for this feature, this is my next step. I am thinking that there may be a GAIM plugin already in existance for this, as GAIM has a strong open source community.

I will post my source code to what I have done, tomorrow when I get back into the office. Maybe the source would be usefull for someone that wants to see some examples of WebClient, RegEx, HtmlDecoding (for special characters).

Posted in .NET Programming | Trackback | del.icio.us | Top Of Page

No comments yet

Leave a Reply


You must be logged in to post a comment.