diff --git a/src/app/components/language-switcher/language-switcher.component.ts b/src/app/components/language-switcher/language-switcher.component.ts index 543a221..0cdb96e 100644 --- a/src/app/components/language-switcher/language-switcher.component.ts +++ b/src/app/components/language-switcher/language-switcher.component.ts @@ -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({