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.
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...)
<ul class="block-with-icons clearfix">
<li class="b1">
<a href="http://test.ca/?page_id=69">
<h5><script>
if(window.location.href== "http://testfrench.ca/?lang=fr"){
document.write("Bonjour")
} else {
document.write("Hello")
}
</script></h5>
<span> <script>
if(window.location.href== "http://testfrench.ca/?lang=fr"){
document.write("Informez-vous")
} else {
document.write("Get informed")
}
</script>
</span>
</a>
</li>
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.