|
var language = "spanish" |
|
function translatePage() { |
|
var data |
|
var links |
|
if (language === "spanish") { |
|
data = english_data |
|
links = english_links |
|
|
|
document.getElementById("translate").innerHTML = "<img id=\"flag-translate\" src=\"images/spain.png\" alt=\"\"> Español" |
|
language = "english" |
|
} else { |
|
data = spanish_data |
|
links = spanish_links |
|
|
|
document.getElementById("translate").innerHTML = "<img id=\"flag-translate\" src=\"images/united-states.png\" alt=\"\"> English" |
|
language = "spanish" |
|
} |
|
|
|
displayElements(language) |
|
|
|
|
|
|
|
|
|
|
|
document.getElementById("subname").innerHTML = data['toolSubname'] |
|
document.getElementById("intro_1").innerHTML = data['introduction_1'] |
|
document.getElementById("intro_2").innerHTML = data['introduction_2'] |
|
|
|
|
|
document.getElementById("tutorial").href = links['main_tutorial'] |
|
|
|
|
|
|
|
|
|
|
|
|
|
document.getElementById("word-bias-title").innerHTML = data['wordBias']['title'] |
|
document.getElementById("word-bias-description").innerHTML = data['wordBias']['description'] |
|
document.getElementById("word-bias-tutorial").innerHTML = data['wordBias']['tutorial'] |
|
document.getElementById("word-bias-manual-1").innerHTML = data['wordBias']['manual-1'] |
|
document.getElementById("word-bias-manual-2").innerHTML = data['wordBias']['manual-2'] |
|
|
|
|
|
document.getElementById('word-bias-demo').href = links['wordBias']['demo'] |
|
document.getElementById("word-bias-tutorial").href = links['wordBias']['tutorial'] |
|
document.getElementById("word-bias-manual-1").href = links['wordBias']['manual-1'] |
|
document.getElementById("word-bias-manual-2").href = links['wordBias']['manual-2'] |
|
|
|
|
|
|
|
|
|
document.getElementById("phrase-bias-title").innerHTML = data['phraseBias']['title'] |
|
document.getElementById("phrase-bias-description").innerHTML = data['phraseBias']['description'] |
|
document.getElementById("phrase-bias-tutorial-1").innerHTML = data['phraseBias']['tutorial-1'] |
|
document.getElementById("phrase-bias-tutorial-2").innerHTML = data['phraseBias']['tutorial-2'] |
|
document.getElementById("phrase-bias-manual-1").innerHTML = data['phraseBias']['manual-1'] |
|
document.getElementById("phrase-bias-manual-2").innerHTML = data['phraseBias']['manual-2'] |
|
|
|
|
|
document.getElementById('phrase-bias-demo').href = links['phraseBias']['demo'] |
|
document.getElementById("phrase-bias-tutorial-1").href = links['phraseBias']['tutorial-1'] |
|
document.getElementById("phrase-bias-tutorial-2").href = links['phraseBias']['tutorial-2'] |
|
document.getElementById("phrase-bias-manual-1").href = links['phraseBias']['manual-1'] |
|
document.getElementById("phrase-bias-manual-2").href = links['phraseBias']['manual-2'] |
|
|
|
|
|
|
|
|
|
document.getElementById("data-bias-title").innerHTML = data['dataBias']['title'] |
|
document.getElementById("data-bias-description").innerHTML = data['dataBias']['description'] |
|
document.getElementById("data-bias-tutorial").innerHTML = data['dataBias']['tutorial'] |
|
document.getElementById("data-bias-manual").innerHTML = data['dataBias']['manual'] |
|
|
|
document.getElementById("data-bias-demo").href = links['dataBias']['demo'] |
|
document.getElementById("data-bias-tutorial").href = links['dataBias']['tutorial'] |
|
document.getElementById("data-bias-manual").href = links['dataBias']['manual'] |
|
|
|
|
|
|
|
|
|
document.getElementById("backup-title").innerHTML = data['backup-title'] |
|
document.getElementById("organization-title").innerHTML = data['organization-title'] |
|
document.getElementById("sponsors-title").innerHTML = data['sponsors-title'] |
|
document.getElementById("our-pages-title").innerHTML = data['our-pages-title'] |
|
|
|
|
|
|
|
|
|
|
|
document.getElementById("hf").innerHTML = data['hf_btn'] |
|
document.getElementById("ccad").innerHTML = data['ccad_btn'] |
|
document.getElementById("tutorial").innerHTML = data['tutorial_btn'] |
|
|
|
|
|
document.getElementById("hf").href = links['hf_stable'] |
|
document.getElementById("ccad").href = links['ccad_stable'] |
|
|
|
|
|
document.getElementById("footer-description").innerHTML = data['footer'] |
|
} |
|
|
|
function displayElements(language) { |
|
|
|
if (language === "english") { |
|
|
|
|
|
document.getElementById("word-bias-manual-1").style.visibility = 'hidden' |
|
document.getElementById("word-bias-manual-2").style.visibility = 'hidden' |
|
|
|
|
|
document.getElementById("phrase-bias-manual-1").style.visibility = 'hidden' |
|
document.getElementById("phrase-bias-manual-2").style.visibility = 'hidden' |
|
|
|
|
|
document.getElementById("data-bias-card").style.display = 'none' |
|
} else { |
|
|
|
|
|
document.getElementById("word-bias-manual-1").style.visibility = 'visible' |
|
document.getElementById("word-bias-manual-2").style.visibility = 'visible' |
|
|
|
|
|
document.getElementById("phrase-bias-manual-1").style.visibility = 'visible' |
|
document.getElementById("phrase-bias-manual-2").style.visibility = 'visible' |
|
|
|
|
|
document.getElementById("data-bias-card").style.display = 'block' |
|
} |
|
} |