From 21f0f3232264cd4e44993dda0ec5edbc44aa6403 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Mon, 6 Mar 2023 08:39:56 +0100 Subject: [PATCH] Retranslate sidebar on lang change --- kdb-web/src/app/services/sidebar/sidebar.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kdb-web/src/app/services/sidebar/sidebar.service.ts b/kdb-web/src/app/services/sidebar/sidebar.service.ts index 59304f35..91da7e92 100644 --- a/kdb-web/src/app/services/sidebar/sidebar.service.ts +++ b/kdb-web/src/app/services/sidebar/sidebar.service.ts @@ -3,7 +3,7 @@ import { MenuItem } from "primeng/api"; import { BehaviorSubject } from "rxjs"; import { AuthRoles } from "../../models/auth/auth-roles.enum"; import { AuthService } from "../auth/auth.service"; -import { TranslateService } from "@ngx-translate/core"; +import { LangChangeEvent, TranslateService } from "@ngx-translate/core"; import { NavigationEnd, Router } from "@angular/router"; import { ThemeService } from "../theme/theme.service"; import { Server } from "../../models/data/server.model"; @@ -41,7 +41,7 @@ export class SidebarService { }); this.translateService.onLangChange.subscribe(_ => { - this.setMenu(); + this.setMenu(true); }); this.router.events.subscribe(event => {