mapcomplete/UI/i18n/Translation.ts

21 lines
446 B
TypeScript
Raw Normal View History

2020-07-20 10:39:43 +00:00
import { UIElement } from "../UIElement"
import Locale from "./Locale"
export default class Translation extends UIElement{
2020-07-20 21:43:42 +00:00
get txt(): string {
2020-07-20 10:39:43 +00:00
return this.translations[Locale.language.data]
}
2020-07-20 21:43:42 +00:00
protected InnerRender(): string {
return this.txt
}
2020-07-20 10:39:43 +00:00
public readonly translations: object
constructor(translations: object) {
super(Locale.language)
this.translations = translations
}
}