I can get the correct page for the translation of a word from English into Greek using http://translate.google.com/translate_t?sl=en&tl=el&q=Hello
But when I try to parse the response text from that link, using libxml (looking for '<div id=result_box ...'), it yells at me for innumerable parse errors.
I can also do this:
But that would have to be hosted somewhere for it to work, no?
But when I try to parse the response text from that link, using libxml (looking for '<div id=result_box ...'), it yells at me for innumerable parse errors.
I can also do this:
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <script type="text/javascript" src="http://www.google.com/jsapi"></script> <script type="text/javascript"> google.load("language", "1"); function initialize() { google.language.translate("Hello", "en", "el", function(result) { if (!result.error) { var container = document.getElementById("trans"); container.innerHTML = result.translation; } }); } google.setOnLoadCallback(initialize); </script> </head> <body> <div id="trans"></div> </body> </html>
But that would have to be hosted somewhere for it to work, no?