How to use the react-i18next.I18n.language function in react-i18next

To help you get started, we’ve selected a few react-i18next 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 onitsoft / nexchange-open-client-react / src / components / Header / LanguagePicker / LanguagePicker.js View on Github external
sortedSupportedLanguages() {
    const selectedLanguage = I18n.language || window.localStorage.i18nextLng;
    let selectedLngPosition = this.supportedLanguages.indexOf(selectedLanguage);
    if(selectedLngPosition < 0) {
      selectedLngPosition = 0;
    }

    return this.array_move(this.supportedLanguages, selectedLngPosition, 0);
  }