Skip to content

Commit

Permalink
Bug in the language switcher and the language itself mathkruger#73
Browse files Browse the repository at this point in the history
  • Loading branch information
francesco-buscicchio committed Jul 13, 2023
1 parent 9791b6a commit 728c8ec
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class LanguageSwitcherComponent implements OnInit {
hidden: boolean = true;

ngOnInit() {
const defaultLanguage = window.localStorage.getItem("languageSelected") || this.translate.getDefaultLang();
const defaultLanguage = window.localStorage.getItem("languageSelected") || window.navigator.language.slice(0,2);

this.translate.getLangs().forEach(lang => {
this.languages.push({
Expand Down

0 comments on commit 728c8ec

Please sign in to comment.