mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 21:03:17 -07:00
Update app.component.ts
This commit is contained in:
parent
29aa0c1761
commit
cf4d28a87b
1 changed files with 2 additions and 2 deletions
|
@ -53,7 +53,7 @@ export class AppComponent implements OnInit {
|
||||||
private readonly identity: IdentityService,
|
private readonly identity: IdentityService,
|
||||||
@Inject(DOCUMENT) private document: Document) {
|
@Inject(DOCUMENT) private document: Document) {
|
||||||
|
|
||||||
this.translate.addLangs(["da", "de", "en", "es", "fr", "it", "hu", "nl", "no", "pl", "pt", "sk", "sv", "bg", "ru", "cs", "zh"]);
|
this.translate.addLangs(["ca", "da", "de", "en", "es", "fr", "it", "hu", "nl", "no", "pl", "pt", "sk", "sv", "bg", "ru", "cs", "zh"]);
|
||||||
|
|
||||||
if (this.authService.loggedIn()) {
|
if (this.authService.loggedIn()) {
|
||||||
this.identity.getAccessToken().subscribe(x => this.accessToken = x);
|
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
|
// See if we can match the supported langs with the current browser lang
|
||||||
const browserLang: string = translate.getBrowserLang();
|
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|cs|zh/) ? browserLang : "en");
|
this.translate.use(browserLang.match(/ca|da|de|en|es|fr|it|hu|nl|no|pl|pt|sk|sv|bg|ru|cs|zh/) ? browserLang : "en");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue