1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00
pigallery2/frontend/app/language/language.component.ts

26 lines
628 B
TypeScript
Raw Normal View History

2018-03-31 03:30:30 +08:00
import {Component, Input} from '@angular/core';
import {Config} from '../../../common/config/public/Config';
import {Cookie} from 'ng2-cookies';
import {CookieNames} from '../../../common/CookieNames';
@Component({
2018-05-04 07:17:08 +08:00
selector: 'app-language',
templateUrl: './language.component.html',
styleUrls: ['./language.component.css'],
})
export class LanguageComponent {
2018-01-08 05:22:41 +08:00
@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);
}
}
}