import { EventEmitter } from "@angular/core"; export class TranslateStore { /** * The default lang to fallback when translations are missing on the current lang */ defaultLang; /** * The lang currently used */ currentLang = this.defaultLang; /** * a list of translations per lang */ translations = {}; /** * an array of langs */ langs = []; /** * An EventEmitter to listen to translation change events * onTranslationChange.subscribe((params: TranslationChangeEvent) => { * // do something * }); */ onTranslationChange = new EventEmitter(); /** * An EventEmitter to listen to lang change events * onLangChange.subscribe((params: LangChangeEvent) => { * // do something * }); */ onLangChange = new EventEmitter(); /** * An EventEmitter to listen to default lang change events * onDefaultLangChange.subscribe((params: DefaultLangChangeEvent) => { * // do something * }); */ onDefaultLangChange = new EventEmitter(); } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNsYXRlLnN0b3JlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vbGliL3RyYW5zbGF0ZS5zdG9yZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsWUFBWSxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBRzNDLE1BQU0sT0FBTyxjQUFjO0lBQ3pCOztPQUVHO0lBQ0ksV0FBVyxDQUFVO0lBRTVCOztPQUVHO0lBQ0ksV0FBVyxHQUFXLElBQUksQ0FBQyxXQUFXLENBQUM7SUFFOUM7O09BRUc7SUFDSSxZQUFZLEdBQVEsRUFBRSxDQUFDO0lBRTlCOztPQUVHO0lBQ0ksS0FBSyxHQUFrQixFQUFFLENBQUM7SUFFakM7Ozs7O09BS0c7SUFDSSxtQkFBbUIsR0FBeUMsSUFBSSxZQUFZLEVBQTBCLENBQUM7SUFFOUc7Ozs7O09BS0c7SUFDSSxZQUFZLEdBQWtDLElBQUksWUFBWSxFQUFtQixDQUFDO0lBRXpGOzs7OztPQUtHO0lBQ0ksbUJBQW1CLEdBQXlDLElBQUksWUFBWSxFQUEwQixDQUFDO0NBQy9HIiwic291cmNlc0NvbnRlb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