var gT = "http://translate.google.com/translate?u=%u&sl=en&tl=%tl";
function isKolichDotCom(){
return window.location.href.indexOf("http://mark.koli.ch") == 0;
}
function setupTranslate(){
$("p.translateflag").click(function(e){
var href = encodeURIComponent(window.location.href);
var tl = $(this).attr("tl");
gT = gT.replace("%u",href);
gT = gT.replace("%tl",tl);
window.top.location.href = gT;
});
}
$(document).ready(function(){
if(isKolichDotCom()){
setupTranslate();
}
});
I'd love to turn this post into a HOWTO and explain more about how everything works, but I need to take care of some other things around the house. Plus, my right wrist is recovering from a brutal week @work, so I need to keep computer use to a minimum right now (carpal tunnel). Enjoy.


Did you find this post helpful, or at least, interesting?