matrix-dimension/web/app/app.component.ts

22 lines
655 B
TypeScript
Raw Normal View History

import { Component } from "@angular/core";
import "../style/app.scss";
import { TranslateService } from "@ngx-translate/core";
import { HttpClient } from "@angular/common/http";
@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"],
})
export class AppComponent {
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");
}
}
}