I'm trying to make "result.translation" a variable that I can use
globally but I can't seem to do it. The alert in the following script
brings back "undefined".
google.load("language", "1");
$(document).ready(function(){
var res;
function translate(){
google.language.translate("house","en","ru", function(result){
res =
result.translation; });
}
translate();
alert(res);
});
I'm looking for something like:
var res = google.language.translate("house","en","ru");
Could someone please help me make "result.translation" global?
Thanks.
--
You received this message because you are subscribed to the Google Groups
"Google AJAX APIs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en.