Skip to content

Commit

Permalink
fix menu translation (#530)
Browse files Browse the repository at this point in the history
  • Loading branch information
raniamorheg authored Sep 19, 2023
1 parent 9809f99 commit d90d975
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/layout/components/header/header.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,12 @@ export class HeaderComponent implements OnInit, OnDestroy, AfterViewInit {
// @ts-ignore
this.languageSelected = this.tokenStorageService.getLocale();
translate.setDefaultLang(this.languageSelected);
this.fixMenuItemsWidth()
} else {
this.tokenStorageService.setLocalLang('en');
this.languageSelected = 'en';
translate.setDefaultLang('en');
this.fixMenuItemsWidth()
}
// translate.onLangChange
// .pipe(takeUntil(this.isDestroyed$))
Expand Down
6 changes: 6 additions & 0 deletions src/app/user-settings/components/info/info.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import { AccountFacadeService } from '@app/core/facades/account-facade/account-f
import { DOCUMENT, isPlatformBrowser } from '@angular/common';
import { TokenStorageService } from '@app/core/services/tokenStorage/token-storage-service.service';
import { HttpErrorResponse } from '@angular/common/http';
import { environment } from '@environments/environment';
declare var $: any;
export class MyErrorStateMatcher implements ErrorStateMatcher {
isErrorState(
Expand Down Expand Up @@ -235,6 +236,11 @@ export class InfoComponent implements OnInit, OnDestroy {
this.translate.use(lang);
this.langSwiched = true;
this.langchoosen = lang;
if (isPlatformBrowser(this.platformId))
window.open( environment.domainName + '/settings/edit', '_self');



}
selectedGender(gender: any) {
this.isDirty = true;
Expand Down

0 comments on commit d90d975

Please sign in to comment.