I have 2 days trying to figure this out. I want to reloasd the url and if you click again dont append the same thing
I am trying to change the url and reload the page using a function but it is worthless.
I am always getting the url without refreshing the site or somethings i get the url duplicated like this www.mywebsite.com/#googtrans(en|es)#googtrans(en|es)
This is my list, when I click any of the links will trigger the function
<ul class="dropdown-menu dropdown-menu-left dropdown-language">
<li><a class="english" onclick="changeLanguage('en');" >English</a></li>
<li><a class="spanish" onclick="changeLanguage('es');">Spanish</a></li>
<li><a class="chinesse" onclick="changeLanguage('en|zh-CN')">Chinesse</a></li>
</ul>
<script type="text/javascript">
function changeLanguage(language) {
window.location.search += "#googtrans(en|" + language +")";
};