Skip to content
Snippets Groups Projects
Commit bfa6b63d authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire: Committed by Reiter, Christoph
Browse files

Implement dynamic language switching

parent 995b31b5
No related branches found
No related tags found
No related merge requests found
......@@ -54,7 +54,6 @@ class VPUAuth extends LitElement {
connectedCallback() {
super.connectedCallback();
i18n.changeLanguage(this.lang);
const href = window.location.href;
// load Keycloak if we want to force the login or if we were redirected from the Keycloak login page
......@@ -191,6 +190,16 @@ class VPUAuth extends LitElement {
this.dispatchKeycloakDataUpdateEvent();
}
update(changedProperties) {
changedProperties.forEach((oldValue, propName) => {
if (propName === "lang") {
i18n.changeLanguage(this.lang);
}
});
super.update(changedProperties);
}
render() {
return html`
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.5/css/bulma.min.css">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment