01-23-2005, 10:36 PM
the translation to german is not perfect, maybe there is a better webservice
for translation.
for translation.
str s.getsel(0)
typelib MSXML2 {F5078F18-C551-11D3-89B9-0000F81FE221} 4.0
MSXML2.XMLHTTP a._create
str xml =
;<?xml version="1.0" encoding="utf-8"?>
;<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
;<soap:Body>
;<Translate xmlns="http://www.webservicex.net">
;<LanguageMode>EnglishTOGerman</LanguageMode>
;<Text>$$text$$</Text>
;</Translate>
;</soap:Body>
;</soap:Envelope>
xml.findreplace("$$text$$" s)
a.open("POST","http://www.webservicex.net/TranslateService.asmx",0)
a.setRequestHeader("Content-Type","text/xml")
a.setRequestHeader("SOAPAction" "http://www.webservicex.net/Translate")
a.send(xml)
MSXML2.DOMDocument doc=a.responseXML
;BEGIN DIALOG
;0 "" 0x10480A44 0x100 0 0 195 78 "translation result"
;1 Button 0x54030001 0x4 4 26 48 14 "copy"
;3 Edit 0x54030080 0x200 4 6 178 18 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2010505 "" ""
str controls = "3"
str e3 = doc.text
if(!ShowDialog("translate2" 0 &controls)) ret
;to be continued