|
|
|
@ -30,13 +30,13 @@ export class AppComponent implements OnInit {
|
|
|
|
|
private readonly settingsService: SettingsService,
|
|
|
|
|
private readonly jobService: JobService,
|
|
|
|
|
public readonly translate: TranslateService) {
|
|
|
|
|
this.translate.addLangs(["en", "de", "fr","da","es","it","nl","sv"]);
|
|
|
|
|
this.translate.addLangs(["en", "de", "fr","da","es","it","nl","sv","no"]);
|
|
|
|
|
// this language will be used as a fallback when a translation isn't found in the current language
|
|
|
|
|
this.translate.setDefaultLang("en");
|
|
|
|
|
|
|
|
|
|
// See if we can match the supported langs with the current browser lang
|
|
|
|
|
const browserLang: string = translate.getBrowserLang();
|
|
|
|
|
this.translate.use(browserLang.match(/en|fr|da|de|es|it|nl|sv/) ? browserLang : "en");
|
|
|
|
|
this.translate.use(browserLang.match(/en|fr|da|de|es|it|nl|sv|no/) ? browserLang : "en");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ngOnInit() {
|
|
|
|
|