+ if (!res.data) {
+ return res;
+ }
+
+ if(typeof(res.data.error) != 'undefined'){
+ Roo.get(document.body).unmask();
+ Roo.MessageBox.alert("Failure ", res.data.error.message);
+ return;
+ }
+
+ if(typeof(res.data.translations[0].translatedText) == 'undefined'){
+ Roo.MessageBox.alert("Failure ", "Does not found the translated text.");
+ }
+ cb(res.data.translations[0].translatedText);
+
+ //Roo.MessageBox.alert("Failure ", res.message);