title: how do I change language in react-i18next
body: <p>First I Initialize i18next inctance</p>
  <pre><code>import i18n from 'i18next';
  import { initReactI18next } from 'react-i18next';
  
  const resources = {
    en: {
      translation: {
        'Welcome to React': 'Welcome to React and react'
      }
    },
    de: {
      translation: {
        'Welcome to React': 'Bienvenue à React et react-i18next'
      }
    }
  };
  
  i18n.use(initReactI18next).init({
    resources,
    lng: 'de',
  
    interpolation: {
      escapeValue: false
    }
  });
  
  export default i18n;
  </code></pre>
  <p>and then I am using the instance with useTranslation hook in my component</p>
  <pre><code>import React from 'react'
  import { useTranslation } from 'react-i18next'
  
  import classes from './intro.module.scss'
  
  export default function Intro() {
      const { t, i18n } = useTranslation()
      return (
          &lt;div className={classes.container}&gt;
              &lt;div className={classes.innerContainer}&gt;
              &lt;h1&gt;{t('Welcome to React')}&lt;/h1&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      )
  }
  </code></pre>
  <p>so now how do I change the language to <strong>de</strong> from default language I initialized in i18n instance</p>
  <p>I have a button on my navbar and I want that when I click on that button the languages should toggle.</p>