Extension:GoogleTranslate

SUGGESTED code for a translation founction calling GoogleTranslate - based upon code from Extension:Link_Suggest

This extension DOES NOT WORK yet.

PLEASE help me out, I dont understand why the translation call does not return a result - see Problems below.

Problems
The code genrallly works now, but when I call the translation result is not returned and I cant figure why??

This is what is not working for me, for some reason the call is running without returning anything in 'result', the last line of code running by GoogleTranslate reads: ;return"google.language.callbacks."+c} - where c is "id101". .. what is happening?

Ideas
Please add ideas here:
 * May integrate into this: [FCKEditor]
 * Needs a preview function
 * Needs a 'translate and create new article' function

Tools to use

 * Well this may come in handy: Firebug for FireFox, debugger!
 * And this: PNG converter
 * or this: The Gimp

Code in progress
Please observe: This code does not work right not, it is a prototype! You will need to install Extension Link suggest, to get the button! (will be added as soon as I get a PNG editor :-)

The following is to-do before this will work:
 * Load and link to GoogleTranslate
 * Dropdownlists for the languages
 * See code to build dropdown box contents here - view the source: Googles dynamic translate sample


 * Default languages to be setup in localsettings.php
 * How do I get params like $wgContLang passed to the .js code?????


 * Fetch and replace the edit text (have to figure out how to)

Google AJAX API - dynamic load
See more here: Google API examples

Google translate codesnip
Sample of how to edit directly is found here: [TEX Editor]

JavaScript
New version, does not worl eiter! But its better..