Slug duplicates once clicking on link
I have the current URL
http://localhost/wordpress/en/ in my browser, once I click the link (code below) to change slug it changes the URL to
<a href="<?php echo get_home_url(); ?>/en/">English</a>
I want to keep
http://localhost/wordpress/en/, and if there is another slug activated then change the
en to whatever the new slug, instead adding another on it.
How can I prevent slug duplication on URL address?