mirror of
https://github.com/turt2live/matrix-dimension.git
synced 2024-10-01 01:05:53 -04:00
9dc4e99aca
- the traslation feature without the changes from other branches
23 lines
657 B
TypeScript
23 lines
657 B
TypeScript
import { Component } from "@angular/core";
|
|
import "../style/app.scss";
|
|
import { TranslateService } from "@ngx-translate/core";
|
|
import { HttpClient } from "@angular/common/http";
|
|
|
|
@Component({
|
|
selector: "my-app", // <my-app></my-app>
|
|
templateUrl: "./app.component.html",
|
|
styleUrls: ["./app.component.scss"],
|
|
})
|
|
export class AppComponent {
|
|
|
|
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');
|
|
}
|
|
}
|
|
}
|