Skip to content

Commit

Permalink
Detect user language for initial language selection #2022 - Fix initi…
Browse files Browse the repository at this point in the history
…alization bug
  • Loading branch information
HarelM committed Oct 6, 2024
1 parent 680fcac commit 80033ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div mat-dialog-content>
<div *ngIf="step === 0">
<h2>{{resources.language}}</h2>
<mat-radio-group (change)=resources.setLanguage($event.value) value="he">
<mat-radio-group (change)=resources.setLanguage($event.value) [value]="getLanuguageCode()">
<div *ngFor="let language of availableLanguages">
<mat-radio-button [value]="language.code" color="primary" angulartics2On="click" angularticsCategory="Intro" angularticsAction="Select language {{language.code}}">{{resources.getLabelForCode(language.code)}}</mat-radio-button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,7 @@ export class IntroDialogComponent extends BaseMapComponent {
this.dialogRef.close();
}

public getLanuguageCode(): string {
return this.store.selectSnapshot((s) => s.configuration.language.code);
}
}

0 comments on commit 80033ab

Please sign in to comment.