Thursday, July 30, 2009

Is it possible to build a translator in visual basic?

i need to know how to build a translator into a visual basic program can some one please help me.


it needs to be able to auto translate web pages


it only needs to translate frence to english

Is it possible to build a translator in visual basic?
Sure. Not as complicated as it sounds. You would need to choose on-line translator, such as Google Language Tools, post request to it and collect the result.





If you only want to auto-translate web page, the task will be even more simple.





Go to Google Language Tools and choose Translate Web Page from French to English - and see how they construct URL:





The result will be something like this:





' source page:


strPage = "http://www.lemonde.fr"





' translation URL:


strURL = "http://translate.google.com/translate?u...


%26amp; URLEncode(strPage)


%26amp; "%26amp;langpair=fr%7Cen%26amp;hl=en%26amp;ie=UTF-8"





strURL = Inet1.OpenURL(strURL, "GET")


....


.... read the contents
Reply:Prob going to be a huge job. Here's a website that I use for translation. Maybe you could contact them and ask what they use if you don't get any solutions here.


No comments:

Post a Comment