},
failure : function() {
Roo.log("Google key fetch failed");
-
+ // do not display error message...
+ return true;
}
if (src == 'zh-HK') src = 'zh-TW';
if (dest == 'zh-HK') dest = 'zh-TW';
-
+ new Pman.Request({
+ url : baseURL + '/Roo/GoogleTranslate.php',
+ method :'POST',
+ mask : 'Translating',
+ maskEl : document.body,
+ params : {
+ text : str,
+ src : src,
+ dest : dest,
+ },
+ success: function(o)
+ {
+ if (!o.data) {
+ return o;
+ }
+// Roo.MessageBox.alert("Success", "We logged in OK")
+ return o.data.translations[0].translatedText;
+ },
+ failure: function (res) {
+ Roo.log(res);
+ Roo.MessageBox.alert("Failure", "Failed?")
+ }
+ });
x.load(
{