See below for an example of translation between English and German.
Pictures show the messagebox for German, Spanish, French and Russian translations. The translation is of course not perfect, but enough good to understand the general meaning.
The best automated translator I've seen so far is by the company "Prompt": http://www.e-promt.com/ It produces very correct translations and even sees the difference between "hello all Domino developers" and "hello to all Domino developers".
Sub Initialize
Dim xmlhttp, MySoap
Dim StartTag As String,EndTag As String, FromLang As String, ToLang As String, TextToTranslate As String
StartTag= |<div id=result_box dir="ltr">|
EndTag = "</div>"
FromLang="en"
ToLang="de"
TextToTranslate="hello all Domino developers"
TextToTranslate=Replace(TextToTranslate," ","%20")
WebServer="http://translate.google.com/translate_t?text="+TextToTranslate+"&hl=en&langpair="+FromLang+"|"+ToLang+"&ie=utf-8"
Set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
Call xmlhttp.open("GET", WebServer, False)
Call xmlhttp.setRequestHeader("Content-Type", "text/html; charset=utf-8")
Call xmlhttp.setRequestHeader("User-Agent","Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)")
Call xmlhttp.setRequestHeader("Accept","image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*")
Call xmlhttp.setRequestHeader("Accept-Language","sv")
Call xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded")
Call xmlhttp.send(Null)
strxml = xmlhttp.responseText
Msgbox Strleft(Strright(strxml,StartTag),EndTag)
End Sub
Tags: LotusScript