title: How to change a URL based on a condition
body: <p>I need to change a URL of a link of an item based on my window.location condition. I am not really familiar with JAVA so any help or direction to this end would be appreciated. Thanks.</p>
  
  <p>Here is the code I have used thus far to manually change the content of said item (its a workaround for a bilingual site made on a unilingual WP theme...)</p>
  
  <pre><code>&lt;ul class="block-with-icons clearfix"&gt;
      &lt;li class="b1"&gt;
          &lt;a href="http://test.ca/?page_id=69"&gt;
              &lt;h5&gt;&lt;script&gt;
                  if(window.location.href== "http://testfrench.ca/?lang=fr"){
                      document.write("Bonjour")
                  } else {       
                      document.write("Hello")
                  }
              &lt;/script&gt;&lt;/h5&gt;
              &lt;span&gt; &lt;script&gt;
                  if(window.location.href== "http://testfrench.ca/?lang=fr"){
                      document.write("Informez-vous")
                  } else {       
                      document.write("Get informed")
                  }
              &lt;/script&gt;
              &lt;/span&gt;
          &lt;/a&gt;
      &lt;/li&gt;
  </code></pre>
  
  <p>What I need now is for the link to route to the french page and not just the english page upon the same style window.location condition. </p>