1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2024-12-14 11:23:17 +02:00
pigallery2/frontend/app/language/language.component.ts
2018-05-03 19:17:08 -04:00

26 lines
628 B
TypeScript

import {Component, Input} from '@angular/core';
import {Config} from '../../../common/config/public/Config';
import {Cookie} from 'ng2-cookies';
import {CookieNames} from '../../../common/CookieNames';
@Component({
selector: 'app-language',
templateUrl: './language.component.html',
styleUrls: ['./language.component.css'],
})
export class LanguageComponent {
@Input() isDark: boolean;
languages: string[] = [];
current: string = null;
constructor() {
this.languages = Config.Client.languages;
if (Cookie.get(CookieNames.lang) != null) {
this.current = Cookie.get(CookieNames.lang);
}
}
}