Okay, as far as I can tell none of the various Example scripts for querying Google Translate posted on the forum works anymore, because they've moved to a business subscription service model where you have to pay $20 per 1M words, which sucks. In my opinion (and in the spirit of the free, fully accessible internet for all), this kind of service should be free. So while we wait for such a free alternative service to emerge, here's an example of how one could still access Google's new service: #include <Array.au3>
#include <IE.au3>
Local $tag="* # * # *"
Local $oIE=_IECreate("https://translate.google.com/#auto/es")
Local $oForm=_IEFormGetCollection($oIE,0)
Local $oQuery=_IEGetObjByName($oForm,"text")
_IEFormElementSetValue($oQuery, $tag & @CR & "Hello World" & @CR & "This is a test" & @CR & $tag)
_IEFormSubmit($oForm)
_IELoadWait($oIE)
Local $oText=_IEGetObjById($oIE,"gt-res-data")
$lines=StringSplit(_IEPropertyGet($oText,"innerText"),@CRLF,1)
_IEQuit($oIE)
_ArrayDelete($lines,_ArraySearch($lines,$tag,1,0,0,1,0) & "-" & $lines[0])
_ArrayDelete($lines,"1-" & _ArraySearch($lines,$tag,1,0,0,1,1))
$lines[0]=UBound($lines)-1
_ArrayDisplay($lines)
Doubtless this will change again at some point and no longer work. I'm consciously not providing a fully-fledged UDF, just a simple example to illustrate how this could be done, if one were so inclined. And moderators, please let me know if this contravenes forum rules, then I'll remove it again (I'm not sure...). @Deye, I still have to implement this in my UI_Translator when I have some more time, maybe this weekend.