sertBefore(element, x);
            });
        });


    };

    function updateLanguageParameter(value) {
        const param = "lang";

        if (window.location.href.indexOf("?") >= 0) {
            const regExp = new RegExp(param + "(.+?)(&|$)", "g");
            const newUrl = window.location.href.replace(regExp, param + "=" + encodeURIComponent(value) + "$2");
            window.history.pushState("", "", newUrl);
        } else {
            const newUrl = window.location.href + "?" + param + "=" +