scripts/index.js
/** Populate language-select with the available translations */
Populate language-select with the available translations
Populate language - select with the available translations
function populateLanguageSelect() {
    for (let lang in languages) {
        $("#language-select").append(`<option value="${lang}">${languages[lang]}</option>`);
        $("#custom-language-select").append(`<div value="${lang}">${languages[lang]}</div>`);
    }
    $("#custom-language-select div").mousedown(e => {
        changeLanguage(e.currentTarget.getAttribute("value"));
    });
}
function populateLanguageSelect ( ) { for ( let lang in languages ) { $ ( "#language-select" ) . append ( ` ${ lang } ${ languages [ lang ] } ` ) ; $ ( "#custom-language-select" ) . append ( ` ${ lang } ${ languages [ lang ] } ` ) ; } $ ( "#custom-language-select div" ) . mousedown ( e => { changeLanguage ( e . currentTarget . getAttribute ( "value" ) ) ; } ) ; }
Populate language-select with the available translations
Populate language - select with the available translations
// Now, add eventy handlers for them