WordPress - Troubleshooting - I clicked on a link and I am redirected to my current language
In this article, you'll find how to troubleshoot when you're redirected to your original language when clicking on a link.
First of all, it's related to the URL syntax in the source of your <a> HTML tag.
1. Missing Slash "/" at the end of the link
As you can see in the screenshot below, the URL in the source of the <a> tag is http://www.rmfhk.com/zh/storyteller
There is no slash ("/") at the end of the URL. You can check this by going to your browser inspector (right click > inspect)
This is not the proper syntax and that's why you are redirected to the URL of your original web page language.
You need to add a slash ("/") at the end of the URL (directly in the source of your <a> HTML tag).
As you can see below, the URL in the source of the <a> tag is now: http://www.rmfhk.com/zh/storyteller/, with a slash at the end of the URL.
It's now working properly and you'll be redirected to the page version with the language selected.
2. Wrong URL shape
If your URL slug has a port number like this: http://192.168.42.98:8510
The port number ":8510" is causing the issue. You must remove it and it will work properly.