How to use the @ohif/i18n.language 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
constructor(props) {
    super(props);

    this.state = {
      windowLevelData: cloneDeep(props.windowLevelData),
      hotKeysData: cloneDeep(props.hotKeysData),
      generalData: {
        currentLanguage: i18n.language.substring(0, 2),
        // TODO: list of available languages should come from i18n.options.resources
        languages: [
          {
            value: 'en',
            label: 'English',
          },
          {
            value: 'es',
            label: 'Spanish',
          },
        ],
        onChange: language => {
          this.changeLanguage(language);
        },
      },
    };
github OHIF / react-viewerbase / src / components / languageSwitcher / LanguageSwitcher.js View on Github external
  const getCurrentLanguage = (language = i18n.language) =>
    language.split('-')[0];
github OHIF / Viewers / platform / ui / src / components / languageSwitcher / LanguageSwitcher.js View on Github external
  const getCurrentLanguage = (language = i18n.language) =>
    language.split('-')[0];

@ohif/i18n

Internationalization library for The OHIF Viewer

MIT
Latest version published 19 days ago

Package Health Score

90 / 100
Full package analysis

Similar packages