title: How to access current language in getStaticProps Next.js?
body: <p>I'm using i18n in my next app, I need to access the current page language in getStaticProps then i fetch data</p>
  <pre><code>export const getStaticProps = async () =&gt; {
    //need to get language here
  
    return {
      props: { data },
    };
  };
  
  const App = ({ data }) =&gt; {
    //my component where i can get language
  
    const { t, i18n } = useTranslation();
  
    const currentLang = i18n.language;
  };
  </code></pre>