locale + darktheme support, fixes boolean profilefield

This commit is contained in:
_Bastler
2021-03-29 14:35:25 +02:00
parent 2cbfd628a2
commit f76843a2e9
11 changed files with 63 additions and 18 deletions
+4 -2
View File
@@ -8,7 +8,7 @@ import {environment} from '../../environments/environment';
export class I18nService {
locale: string = "de-informal";
locales: any = ["de-informal"];
locales: any[] = ["de-informal"];
i18n: any;
constructor(private http: HttpClient) {
@@ -42,7 +42,9 @@ export class I18nService {
}
try {
this.locales = await this.http.get(environment.apiUrl + "/i18n").toPromise();
await this.http.get(environment.apiUrl + "/i18n").toPromise().then((response: any) => {
this.locales = response;
});
} catch(e) {
console.debug("fallback to default locales");
}