User:TachyonJack/sidebartranslate.js

///////////////////////////////////////////////////////////////////////// // Translates the 'in other languages' list in the sidebar to English. // //              Note: does not translate all languages                // //                                                                    // //                                By Tra                               // //                      (bug fix by Voice_of_All)                     // /////////////////////////////////////////////////////////////////////////

function languagereplace { if (document.getElementById('p-lang')) { var LangNodes=document.getElementById('p-lang').getElementsByTagName('ul')[0].getElementsByTagName('li'); for( var x = 0; x < LangNodes.length; x++ ) {

LangNodes[x].getElementsByTagName('a')[0].href = localtoEnglish(LangNodes[x].getElementsByTagName('a')[0].href); } } }

addOnloadHook (languagereplace)

function localtoEnglish(localname) { //var retval='http://translate.google.com/translate?u='+localname; return 'http://translate.google.com/translate?u='+localname; //return localname; }

}