<script> var myurl = window.location.href; var frenchLink = myurl+'_fr'; document.getElementById('newUrl').href = frenchLink; </script>