let languageSelectorButton = document.getElementById('language-selector-button'); let languageSelector = document.getElementById('language-selector'); languageSelectorButton.addEventListener('click', function () { let code = languageSelector.value; window.location = '/' + code; });