UNPKG

xenos

Version:

Xenos is a data grid built upon angular2 and bootstrap.

24 lines (19 loc) 663 B
import { Injectable } from "@angular/core"; import { Observable } from "rxjs/Observable"; import { Subject } from "rxjs/Subject"; import { I18nArgs } from "./i18n.args"; import { I18n } from "./i18n"; // No typings for require declare var require: any; export class I18nService implements I18n { private locales: any; constructor() { this.translationRequested = new Subject<I18nArgs>(); } public translationRequested: Subject<I18nArgs>; public requestTranslation(key: string): string { let args = new I18nArgs(key); this.translationRequested.next(args); return args.value; } }