How to use the @ohif/i18n.init 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 / react-viewerbase / src / components / userPreferencesModal / UserPreferencesModal.js View on Github external
changeLanguage(language) {
    this.setState({
      generalData: {
        ...this.state.generalData,
        currentLanguage: language,
      },
    });

    i18n.init({
      fallbackLng: language.split('-')[0],
      lng: language,
    });
  }
github OHIF / react-viewerbase / src / components / languageSwitcher / LanguageSwitcher.js View on Github external
const onChange = () => {
    const { value } = event.target;
    const language = getCurrentLanguage(value);
    setCurrentLanguage(language);

    i18n.init({
      fallbackLng: language,
      lng: language,
    });
  };
github OHIF / Viewers / platform / ui / src / components / languageSwitcher / LanguageSwitcher.js View on Github external
const onChange = () => {
    const { value } = event.target;
    const language = getCurrentLanguage(value);
    setCurrentLanguage(language);

    i18n.init({
      fallbackLng: language,
      lng: language,
    });
  };

@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