mirror of
https://framagit.org/framasoft/framadate/funky-framadate-front.git
synced 2023-08-25 13:53:14 +02:00
27 lines
568 B
TypeScript
27 lines
568 B
TypeScript
import {Component} from '@angular/core';
|
|
import {TranslateService} from "@ngx-translate/core";
|
|
|
|
@Component({
|
|
selector: 'app-root',
|
|
templateUrl: './app.component.html',
|
|
styleUrls: ['./app.component.scss']
|
|
})
|
|
export class AppComponent {
|
|
title = 'framadate';
|
|
//translation demo:
|
|
minutes = 12;
|
|
user = {
|
|
name: 'Arthur',
|
|
age: 42
|
|
};
|
|
|
|
constructor(private translate: TranslateService) {
|
|
this.translate.setDefaultLang('fr');
|
|
}
|
|
|
|
switchLanguage(language: string) {
|
|
this.translate.use(language);
|
|
}
|
|
|
|
}
|