// google does not recognize HK...
if (src == 'zh-HK') src = 'zh-TW';
if (dest == 'zh-HK') dest = 'zh-TW';
-
+
+ var ret = '';
+
new Pman.Request({
url : baseURL + '/Core/GoogleTranslate.php',
method :'POST',
},
success: function(o)
{
- if (!o.data) {
+ if (!o) {
return o;
}
if(typeof(o.data.error) != 'undefined'){
- Roo.MessageBox.alert("Failure ", res.data.error.message);
+ Roo.get(document.body).unmask();
+ Roo.MessageBox.alert("Failure ", o.data.error.message);
return;
}
// Roo.MessageBox.alert("Success", "We logged in OK")
- return o.data.translations[0].translatedText;
+ return o.translatedText;
},
failure: function (res) {
Roo.log(res);
Roo.MessageBox.alert("Failure ", res.data.error.message);
}
});
+
+// return ret;
+
//
// x.load(
// {