forked from MapComplete/MapComplete
Add a personal, configurable quest
This commit is contained in:
parent
7ec00a3301
commit
b36b103ed3
7 changed files with 55 additions and 54 deletions
|
@ -1,19 +1,18 @@
|
|||
import {UIEventSource} from "../UIEventSource";
|
||||
import {LocalStorageSource} from "../../Logic/LocalStorageSource";
|
||||
import {DropDown} from "../Input/DropDown";
|
||||
import {Layout} from "../../Customizations/Layout";
|
||||
import {UIElement} from "../UIElement";
|
||||
import {State} from "../../State";
|
||||
|
||||
|
||||
export default class Locale {
|
||||
|
||||
public static language: UIEventSource<string> = Locale.setup();
|
||||
private static setup() {
|
||||
const source = LocalStorageSource.Get('language', "en");
|
||||
// @ts-ignore
|
||||
window.setLanguage = function (language: string) {
|
||||
source.setData(language)
|
||||
const source = LocalStorageSource.Get('language', "en");
|
||||
if (!UIElement.runningFromConsole) {
|
||||
// @ts-ignore
|
||||
window.setLanguage = function (language: string) {
|
||||
source.setData(language)
|
||||
}
|
||||
}
|
||||
return source;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue