fix iframe locale
This commit is contained in:
parent
4c11c4d9e6
commit
d68060b3fb
@ -31,7 +31,13 @@ export class I18nService {
|
||||
|
||||
async fetch() {
|
||||
|
||||
let browserLocale = navigator.language;
|
||||
await this.http.get(environment.apiUrl + "/i18n").subscribe({
|
||||
next: (data: any) => {
|
||||
this.locales = data;
|
||||
}, error: (error) => { }
|
||||
});
|
||||
|
||||
let browserLocale = window.navigator.language || window.parent.navigator.language;
|
||||
|
||||
if (browserLocale.indexOf("-") != -1) {
|
||||
browserLocale = browserLocale.split("-")[ 0 ];
|
||||
@ -46,12 +52,6 @@ export class I18nService {
|
||||
locale = 'de-informal';
|
||||
}
|
||||
|
||||
await this.http.get(environment.apiUrl + "/i18n").subscribe({
|
||||
next: (data: any) => {
|
||||
this.locales = data;
|
||||
}, error: (error) => { }
|
||||
});
|
||||
|
||||
if (this.locales.indexOf(locale) == -1) {
|
||||
locale = this.locales[ 0 ];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user