 () {
                const selectedLanguage = this.value;
                const currentURL = new URL(window.location.href);
                currentURL.searchParams.set("language", selectedLanguage);
                history.replaceState(null, "", currentURL.toString());
                window.location.reload();
            });
        </script>
    </th:block>
</html>
