From ab9a7e0e41f0106b6bb71612766eb7dac012ecbe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lukas=20Mau=C3=9F?= <lukas.mauss@mni.thm.de>
Date: Tue, 19 Feb 2019 11:01:31 +0100
Subject: [PATCH] Add i18n stuff to new landing

---
 .../home/new-landing/new-landing.component.ts          | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/app/components/home/new-landing/new-landing.component.ts b/src/app/components/home/new-landing/new-landing.component.ts
index 872b99425..e518f3609 100644
--- a/src/app/components/home/new-landing/new-landing.component.ts
+++ b/src/app/components/home/new-landing/new-landing.component.ts
@@ -1,10 +1,12 @@
 import { Component, OnInit } from '@angular/core';
-import { RoomCreateComponent } from '../../creator/_dialogs/room-create/room-create.component';
+import { RoomCreateComponent } from '../_dialogs/room-create/room-create.component';
 import { MatDialog } from '@angular/material';
 import { AuthenticationService } from '../../../services/http/authentication.service';
 import { User } from '../../../models/user';
 import { UserRole } from '../../../models/user-roles.enum';
 import { Router } from '@angular/router';
+import { TranslateService } from '@ngx-translate/core';
+import { LanguageService } from '../../../services/util/language.service';
 
 @Component({
   selector: 'app-new-landing',
@@ -18,11 +20,15 @@ export class NewLandingComponent implements OnInit {
 
   constructor(public authenticationService: AuthenticationService,
               private router: Router,
-              public dialog: MatDialog) {
+              public dialog: MatDialog,
+              private translateService: TranslateService,
+              protected langService: LanguageService) {
+    langService.langEmitter.subscribe(lang => translateService.use(lang));
   }
 
   ngOnInit() {
     this.authenticationService.watchUser.subscribe(newUser => this.user = newUser);
+    this.translateService.use(localStorage.getItem('currentLang'));
   }
 
   openCreateRoomDialog(): void {
-- 
GitLab