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({
|
2017-08-27 01:26:00 -04:00
|
|
|
selector: "my-app", // <my-app></my-app>
|
|
|
|
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) {
|
|
|
|
translate.addLangs(['en', 'de']);
|
|
|
|
translate.setDefaultLang('de');
|
|
|
|
if (navigator.language === 'de') {
|
|
|
|
translate.use('de');
|
|
|
|
} else {
|
|
|
|
translate.use('en');
|
|
|
|
}
|
2017-05-26 23:51:48 -04:00
|
|
|
}
|
|
|
|
}
|