Content deleted Content added
add trivial function for testing |
first draft of interwiki translation code |
||
Line 367:
function translateInterwikiCodes() {
var hyperlinks;
var num_hyperlinks;
var temp_hyperlink;
var hyperlink_counter;
var language_code;
var English_translation;
// Loop over the interwiki links
hyperlinks = document.getElementById("p-lang").getElementsByTagName("a");
num_hyperlinks = hyperlinks.length;
while (hyperlink_counter<num_hyperlinks) {
temp_hyperlink = hyperlinks[hyperlink_index];
hyperlink_counter++;
language_code = temp_hyperlink.className.replace(/interwiki-/, "");
English_translation = interwiki_English_names[language_code];
temp_hyperlink.innerHTML = English_translation;
} // closes loop over interwiki links
} // closes function translateInterwikiCodes()
|