Add the current path for the new link
<p>I want add the current path for the new links (to be able to switch the language staying on the same page).</p>

<p>How can I add the current <code>window.location.pathname</code> to new URLs?</p>