How to use the @aurelia/i18n.I18nService function in @aurelia/i18n

To help you get started, we’ve selected a few @aurelia/i18n examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aurelia / aurelia / packages / __tests__ / i18n / i18n.spec.ts View on Github external
async function createFixture(options: I18nInitOptions = {}) {
    const i18nextSpy = new Spy();
    const eaSpy: Spy = new Spy();
    const mockSignaler = new MockSignaler();
    const sut = new I18nService(
      { i18next: i18nextSpy.getMock(i18next) },
      options,
      eaSpy.getMock(new EventAggregator()),
      mockSignaler
    );
    await sut.task.wait();
    return { i18nextSpy, sut, eaSpy, mockSignaler };
  }
github aurelia / aurelia / packages / __tests__ / i18n / nf / number-format-value-converter.spec.ts View on Github external
function createFixture() {
    const i18n = new I18nService({ i18next }, {}, new EventAggregator(), new MockSignaler());
    const sut = new NumberFormatValueConverter(i18n);
    return { i18n, sut };
  }
github aurelia / aurelia / packages / __tests__ / i18n / rt / relative-time-value-converter.spec.ts View on Github external
function createFixture() {
    const i18n = new I18nService({ i18next }, {}, new EventAggregator(), new MockSignaler());
    const sut = new RelativeTimeValueConverter(i18n);
    return { i18n, sut };
  }
github aurelia / aurelia / packages / __tests__ / i18n / df / date-format-value-converter.spec.ts View on Github external
function createFixture() {
    const i18n = new I18nService({ i18next }, {}, new EventAggregator(), new MockSignaler());
    const sut = new DateFormatValueConverter(i18n);
    return { i18n, sut };
  }