How to use the @ohif/i18n.on 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 / platform / ui / src / components / languageSwitcher / LanguageSwitcher.js View on Github external
useEffect(() => {
    let mounted = true;

    i18n.on('languageChanged', () => {
      if (mounted) {
        setCurrentLanguage(getCurrentLanguage());
      }
    });

    return () => {
      mounted = false;
    };
  }, []);
github OHIF / react-viewerbase / src / components / languageSwitcher / LanguageSwitcher.js View on Github external
useEffect(() => {
    let mounted = true;

    i18n.on('languageChanged', () => {
      if (mounted) {
        setCurrentLanguage(getCurrentLanguage());
      }
    });

    return () => {
      mounted = false;
    };
  }, []);

@ohif/i18n

Internationalization library for The OHIF Viewer

MIT
Latest version published 29 days ago

Package Health Score

84 / 100
Full package analysis

Similar packages