Updated the button texts.

This commit is contained in:
Joachim Nielandt 2018-03-25 16:31:12 +02:00
parent 8adccdc296
commit 7f0a1e78d7
2 changed files with 24 additions and 6 deletions

View File

@ -18,10 +18,15 @@
<div id="topmenubuttons"> <div id="topmenubuttons">
<div class="btn-group mx-auto" role="group"> <div class="btn-group mx-auto" role="group">
<!--removed this from the <i: tooltip="Huis" placement="bottom"--> <!--removed this from the <i: tooltip="Huis" placement="bottom"-->
<a routerLink="home" (mouseout)="mouseOut('home')" (mouseover)="mouseOver('home')"><i class="fa fa-home fa-fw fa-2x" aria-hidden="true"></i></a> <a routerLink="home" (mouseout)="mouseOut('home')" (mouseover)="mouseOver('home')"><i
<a routerLink="posts" (mouseout)="mouseOut('posts')" (mouseover)="mouseOver('posts')"><i class="fa fa-sticky-note fa-fw fa-2x" aria-hidden="true"></i></a> class="fa fa-home fa-fw fa-2x" aria-hidden="true"></i></a>
<a routerLink="cv" (mouseout)="mouseOut('cv')" (mouseover)="mouseOver('cv')"><i class="fa fa-id-badge fa-fw fa-2x" aria-hidden="true"></i></a> <a routerLink="posts" (mouseout)="mouseOut('posts')" (mouseover)="mouseOver('posts')"><i
<a (click)="toggleLanguage()" (mouseout)="mouseOut('language setting')" (mouseover)="mouseOver('language setting')"><i class="fa fa-language fa-fw fa-2x" aria-hidden="true"></i></a> class="fa fa-sticky-note fa-fw fa-2x" aria-hidden="true"></i></a>
<a routerLink="cv" (mouseout)="mouseOut('cv')" (mouseover)="mouseOver('cv')"><i
class="fa fa-id-badge fa-fw fa-2x" aria-hidden="true"></i></a>
<a (click)="toggleLanguage()" (mouseout)="mouseOut('lang')"
(mouseover)="mouseOver('lang')"><i class="fa fa-language fa-fw fa-2x"
aria-hidden="true"></i></a>
</div> </div>
</div> </div>
</div> </div>

View File

@ -78,8 +78,21 @@ export class RootComponent implements OnInit {
mouseOver(s: string) { mouseOver(s: string) {
// console.log('mouseover!' + s); // console.log('mouseover!' + s);
// do some translation
let language = this.stateService.getLanguage();
if (s === 'lang') {
if (language == 'nl') {
this.mousingOver = 'Taal: Nederlands';
} else if (language = 'en') {
this.mousingOver = 'Language: English';
} else {
this.mousingOver = 'Language: Yaaarrrr matey!';
}
} else {
// default: use the passed string
this.mousingOver = s; this.mousingOver = s;
} }
}
mouseOut(s: string) { mouseOut(s: string) {
this.mousingOver = null; this.mousingOver = null;