function prepareTranslation() {
    const button = document.getElementById('globe-icon');
    const tooltip = document.getElementById('lang-selector');
    tooltip.style.display = "none";
    // Cuando se pulsa el icono del globo, se abre o cierra el tooltip
    button.onclick = function() {
        if(tooltip.style.display != "block") {
            tooltip.style.display = "block";
        } else {
            tooltip.style.display = "none";
        }
    };
    // Sets the language page to the stored one
    let lang = localStorage.getItem("lang");
    // If there is no language stored it puts spanish as default
    if(localStorage.getItem("lang") === null) {
        lang = "es"
    }
    translate(lang);
}
// Called when page reloaded to translate everything

Called when page reloaded to translate everything
Called when page reloaded to translate everything
function prepareTranslation() {
    const button = document.getElementById('globe-icon');
    const tooltip = document.getElementById('lang-selector');
    tooltip.style.display = "none";
    button.onclick = function() {
        if(tooltip.style.display != "block") {
            tooltip.style.display = "block";
        } else {
            tooltip.style.display = "none";
        }
    };
    let lang = localStorage.getItem("lang");
    if(localStorage.getItem("lang") === null) {
        lang = "es"
    }
    translate(lang);
}
function prepareTranslation ( ) { const button = document . getElementById ( 'globe-icon' ) ; const tooltip = document . getElementById ( 'lang-selector' ) ; tooltip . style . display = "none" ; button . onclick = function ( ) { if ( tooltip . style . display != "block" ) { tooltip . style . display = "block" ; } else { tooltip . style . display = "none" ; } } ; let lang = localStorage . getItem ( "lang" ) ; if ( localStorage . getItem ( "lang" ) === null ) { lang = "es" } translate ( lang ) ; }
Called when page reloaded to translate everything
Called when page reloaded to translate everything
// Cuando se pulsa el icono del globo, se abre o cierra el tooltip
 // Sets the language page to the stored one
 // If there is no language stored it puts spanish as default
