2017-05-26 23:51:48 -04:00
|
|
|
import { Component } from "@angular/core";
|
|
|
|
import "../style/app.scss";
|
2020-10-23 07:30:20 -04:00
|
|
|
import { TranslateService } from "@ngx-translate/core";
|
|
|
|
import { HttpClient } from "@angular/common/http";
|
2017-05-26 23:51:48 -04:00
|
|
|
|
|
|
|
@Component({
|
2021-09-01 19:29:24 -04:00
|
|
|
selector: "my-app", // <my-app></my-app>
|
2017-08-27 01:26:00 -04:00
|
|
|
templateUrl: "./app.component.html",
|
|
|
|
styleUrls: ["./app.component.scss"],
|
2017-05-26 23:51:48 -04:00
|
|
|
})
|
|
|
|
export class AppComponent {
|
2020-10-23 07:30:20 -04:00
|
|
|
constructor(public translate: TranslateService, public http: HttpClient) {
|
2021-09-01 19:01:01 -04:00
|
|
|
translate.addLangs(["en", "de"]);
|
|
|
|
translate.setDefaultLang("de");
|
|
|
|
if (navigator.language === "de") {
|
|
|
|
translate.use("de");
|
|
|
|
} else {
|
|
|
|
translate.use("en");
|
2020-10-23 07:30:20 -04:00
|
|
|
}
|
2017-05-26 23:51:48 -04:00
|
|
|
}
|
|
|
|
}
|