locale + darktheme support, fixes boolean profilefield
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user