2018-03-30 21:30:30 +02:00
|
|
|
import {Component, Input} from '@angular/core';
|
|
|
|
import {Config} from '../../../common/config/public/Config';
|
|
|
|
import {Cookie} from 'ng2-cookies';
|
|
|
|
import {CookieNames} from '../../../common/CookieNames';
|
2017-12-25 01:42:25 +02:00
|
|
|
|
|
|
|
@Component({
|
2018-05-04 01:17:08 +02:00
|
|
|
selector: 'app-language',
|
2017-12-25 01:42:25 +02:00
|
|
|
templateUrl: './language.component.html',
|
|
|
|
styleUrls: ['./language.component.css'],
|
|
|
|
})
|
|
|
|
export class LanguageComponent {
|
|
|
|
|
2018-01-07 23:22:41 +02:00
|
|
|
@Input() isDark: boolean;
|
2017-12-25 01:42:25 +02:00
|
|
|
languages: string[] = [];
|
|
|
|
current: string = null;
|
|
|
|
|
|
|
|
constructor() {
|
|
|
|
this.languages = Config.Client.languages;
|
|
|
|
if (Cookie.get(CookieNames.lang) != null) {
|
|
|
|
this.current = Cookie.get(CookieNames.lang);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|