gExp = 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 + "=" + encodeURIComponent(value);
            window.history.pushState("", "", newUrl);
        }
    }

    function getLanguageParameter() {
        var match = RegExp('[?&]lang=([^&]*)').exec(window.location.search);