Added i18n, started working on monitoring

This commit is contained in:
simon987
2019-02-05 20:11:52 -05:00
parent 22f4a6b358
commit 87f4d08984
22 changed files with 230 additions and 785 deletions

View File

@@ -1,4 +1,6 @@
import {Component} from '@angular/core';
import {TranslateService} from "@ngx-translate/core";
import {MatSelectChange} from "@angular/material";
@Component({
selector: 'app-root',
@@ -6,5 +8,24 @@ import {Component} from '@angular/core';
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'angular';
langChange(event: MatSelectChange) {
this.translate.use(event.value)
}
langList: any[] = [
{lang: "fr", display: "Français"},
{lang: "en", display: "English"},
];
constructor(private translate: TranslateService) {
translate.addLangs([
"en",
"fr"
]);
translate.setDefaultLang("en");
}
}