Content deleted Content added
first draft of interwiki translation code |
add acknowledgment string |
||
Line 367:
function translateInterwikiCodes() {
var alert_string;
var hyperlinks;
Line 379 ⟶ 380:
hyperlinks = document.getElementById("p-lang").getElementsByTagName("a");
alert_string = "";
num_hyperlinks = hyperlinks.length;
if (num_hyperlinks > 45) { num_hyperlinks = 45; }
while (hyperlink_counter<num_hyperlinks) {
temp_hyperlink = hyperlinks[hyperlink_index];
Line 386 ⟶ 389:
language_code = temp_hyperlink.className.replace(/interwiki-/, "");
English_translation = interwiki_English_names[language_code];
alert_string += "Interwiki link " + hyperlink_counter + " : " + language_code + "\n";
temp_hyperlink.innerHTML = English_translation;
} // closes loop over interwiki links
alert_string += "\nTranslated " + hyperlink_counter + "interwiki links into English.";
window.alert(alert_string);
} // closes function translateInterwikiCodes()
|