Ajout de la traduction sur la page d'accueil
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { Component, OnInit } from "@angular/core";
|
||||
import { Router } from "@angular/router";
|
||||
import { TranslateService } from "@ngx-translate/core";
|
||||
|
||||
import { User } from "../models/user";
|
||||
import { CacheApiKey } from "../models/cache-api-key.enum";
|
||||
@@ -22,9 +23,13 @@ export class AppComponent implements OnInit {
|
||||
constructor(private router: Router,
|
||||
private authenticationService: AuthenticationService,
|
||||
private serviceComm: ServiceComm,
|
||||
private serviceCacheApi : ServiceCacheApi)
|
||||
private serviceCacheApi : ServiceCacheApi,
|
||||
private translateService: TranslateService)
|
||||
{
|
||||
this.authenticationService.currentUser.subscribe(user => { this.currentUser = user; });
|
||||
this.authenticationService.currentUser.subscribe(user => {
|
||||
this.currentUser = user;
|
||||
this.translateService.use(user.language);
|
||||
});
|
||||
|
||||
ConfigurationHelper.settings.subscribe(settings =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user