How to use the @ohif/i18n.initializing function in @ohif/i18n

To help you get started, we’ve selected a few @ohif/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 OHIF / Viewers / extensions / vtk / src / loadLocales.js View on Github external
async function loadLocales() {
  // Note: We should wait for the i18n initializing
  // promise to complete before adding any new
  // resources to i18next. If the resources are added
  // to i18next before initialization is complete, the
  // backend values (e.g. those from Locize) will not
  // be loaded properly.
  try {
    await i18n.initializing;
  } catch(error) {
    throw new Error(error);
  }

  i18n.addLocales(locales);
}

@ohif/i18n

Internationalization library for The OHIF Viewer

MIT
Latest version published 15 days ago

Package Health Score

90 / 100
Full package analysis

Similar packages