UNPKG

@rr0/lang

Version:

Language and translation

17 lines 430 B
import { Translator } from "./Translator.js"; /** * A Translator that holds its messages. * * @param T the message type */ export class Translation extends Translator { constructor(locale, grammar, messages) { super(locale, grammar); this.locale = locale; this.messages = messages; } add(key, value) { this.messages.dict[key] = value; } } //# sourceMappingURL=Translation.js.map