Line | |
---|
1 | /* file: google_translate.js - v2.1.0 | minified on 2011/01/27 with http://jscompress.com/ */ |
---|
2 | google.load("language","1");var global_google_translate_plugin_objdest;var global_google_translate_plugin_callback;var global_google_translate_plugin_objproperty;function google_translate(text,pfrom,pto,objdest,objproperty) |
---|
3 | {global_google_translate_plugin_objdest=objdest;global_google_translate_plugin_objproperty=objproperty;google.language.translate(text,pfrom,pto,google_translate_do);} |
---|
4 | function google_translate_do(result) |
---|
5 | {if(!result.error) |
---|
6 | {if(global_google_translate_plugin_objproperty=='value') |
---|
7 | {global_google_translate_plugin_objdest.value=result.translation;} |
---|
8 | else if(global_google_translate_plugin_objproperty=='innerHTML') |
---|
9 | {global_google_translate_plugin_objdest.innerHTML=result.translation;}}} |
---|
10 | function googleTranslate(text,pfrom,pto,callback) |
---|
11 | {global_google_translate_plugin_callback=callback;google.language.translate(text,pfrom,pto,googleTranslateDo);} |
---|
12 | function googleTranslateDo(result) |
---|
13 | {if(!result.error) |
---|
14 | {global_google_translate_plugin_callback(result.translation);}} |
---|
Note: See
TracBrowser
for help on using the repository browser.