in your head: (or better yet at the bottom above the )
Code: Select all
<__script__ type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'></__script>
<__script__ type="text/javascript" src="http://www.google.com/jsapi"></__script> 
Code: Select all
google.load("language", "1"); 
var currentTrans='en';
$(document).ready(function(){ 
	$('#link1').toggle(function(){ 
		$("p,a,span").each(function(){ 
			var element = $(this); 
			google.language.translate($(this).html(), ''+currentTrans+'', 'es', function(result){ 
				$(element).html(result.translation); 
			});
		});
		currentTrans='es';
		$(this).html('English'); 
	}, function(){ 
		$("p,a,span").each(function(){ 
			var element = $(this); 
			google.language.translate($(this).html(), ''+currentTrans+'', 'en', function(result){ 
				$(element).html(result.translation); 
			});
		});
		currentTrans='en';
		$(this).html('En Espanol'); 
	}); 
});
En Espanol
or what have you as long at the id's line up.. That's it.. real simple.. you can expand on it alot and I use a much more soup’ed up version of this where I use more of the api. But you get the idea.. Try it out..
 
 Cheers -Jeremy
Note you should read Google AJAX Language API. In particular.. Branding and Google Attribution and what not..

