title: Download different files according to browser language
body: <p>How can I download different files according to the lang attribute in HTML?</p>
  <p>Currently, my code is looking like this:</p>
  <pre><code>import { useTranslation } from &quot;react-i18next&quot;;
  
  import ENCV from &quot;../assets/englishCV.pdf&quot;;
  import PTCV from &quot;../assets/portugueseCV.pdf&quot;;
  
  const CTA = () =&gt; {
      const { t } = useTranslation();
  
      const onDownloadCV = () =&gt; {
          if(document.getElementsByTagName(&quot;html&quot;)[0].getAttribute(&quot;lang&quot;) === &quot;pt&quot;) {      
          }
      };
  
      return(
          &lt;div className=&quot;cta&quot;&gt;
              &lt;a href={} download className=&quot;btn&quot;&gt;{t(&quot;downloadCV&quot;)}&lt;/a&gt;
              &lt;a href=&quot;#contact&quot; className=&quot;btn btn-primary&quot;&gt;{t(&quot;contactButton&quot;)}&lt;/a&gt;
          &lt;/div&gt;
      );
  };
  
  export default CTA;
  </code></pre>