I'm working on a website and I've decided to make it multilanguage.
By default all of the texts and links are in french and the others texts are hidden. When you click on "ENG" the french text is hidden and the english text becomes visible, same for chinese.
The problem is that it works only the page you're on. If you go to another page the text will be in french again. What can I do so that when I change the language it changes the language of the whole site ?
<nav id="mainnav">
<a href="index.html" class="fr">Accueil</a>
<a href="nosproduits.html" class="fr">Nos produits</a>
<a href="apropos.html" class="fr">À propos</a>
<a href="contact.html" class="fr">Contact</a>
<a href="index.html" class="eng">Home</a>
<a href="nosproduits.html" class="eng">Our products</a>
<a href="apropos.html" class="eng">About</a>
<a href="contact.html" class="eng">Contact</a>
<a href="index.html" class="zh">首页</a>
<a href="nosproduits.html" class="zh">我们的食品</a>
<a href="apropos.html" class="zh">关于我们</a>
<a href="contact.html" class="zh">联络我们</a>
</nav>
<div id="navright">
<span id="french">FR</span>
<span id="english">ENG</span>
<span id="chinese">中文</span>
</div>
.eng {
display: none;
}
JQuery
$(document).ready(function(){
$("#chinese").click(function(){
$(".eng").hide();
$(".fr").hide();
$(".zh").show();
})
$("#english").click(function(){
$(".eng").show();
$(".fr").hide();
$(".zh").hide();
})
$("#french").click(function(){
$(".eng").hide();
$(".fr").show();
$(".zh").hide();
})
})