|
|
|
@ -53,7 +53,7 @@ export class AppComponent implements OnInit {
|
|
|
|
|
private readonly identity: IdentityService,
|
|
|
|
|
@Inject(DOCUMENT) private document: HTMLDocument) {
|
|
|
|
|
|
|
|
|
|
this.translate.addLangs(["da", "de", "en", "es", "fr", "it", "hu", "nl", "no", "pl", "pt", "sk", "sv", "bg", "ru"]);
|
|
|
|
|
this.translate.addLangs(["da", "de", "en", "es", "fr", "it", "hu", "nl", "no", "pl", "pt", "sk", "sv", "bg", "ru", "cs", "zh"]);
|
|
|
|
|
|
|
|
|
|
if (this.authService.loggedIn()) {
|
|
|
|
|
this.identity.getAccessToken().subscribe(x => this.accessToken = x);
|
|
|
|
@ -81,7 +81,7 @@ export class AppComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
// See if we can match the supported langs with the current browser lang
|
|
|
|
|
const browserLang: string = translate.getBrowserLang();
|
|
|
|
|
this.translate.use(browserLang.match(/da|de|en|es|fr|it|hu|nl|no|pl|pt|sk|sv|bg|ru/) ? browserLang : "en");
|
|
|
|
|
this.translate.use(browserLang.match(/da|de|en|es|fr|it|hu|nl|no|pl|pt|sk|sv|bg|ru|cs|zh/) ? browserLang : "en");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|