Background of the issue:
I setup WPML on my website as the steps showed and then published my first two pages (imprint and privacy policy). I published them in German and then created an English translation. I added the button to switch the language to the menu.
Symptoms:
If I hover the button, it shows the correct URL (the .com domain which leads to the English translation) but when I click it, it redirects me to the German version I am on anyway. I cant get on the english version in any way. Even if i type in the direct URL for the english version in a new tab, it redirects me to the german one. I cleared my cache, tried using incognito mode and other browsers, same result.
Questions:
Am I doing something wrong or what can I do to make it work?
I understand the issue you're experiencing. It seems that the translation of the "Imprint" page was started but not completed as per our translation management system. Since the translation is incomplete, you shouldn't be able to switch languages. It's unusual that the language switcher is still showing a link to the translated page.
Have you previously translated the page and then deleted the translation? If so, you'll need to delete the translation from "Trash" as well and then retranslate the page into English.
If that is not the case, please try the following and check if that helps in solving the issue:
- Take a full backup of the site including the database
- Please navigate to "Settings > General" and ensure that both the site URL and WordPress URL are set to the default site URL.
- Navigate to the root directory of your site using the File Manager in your hosting control panel.
- You'll find a file name '.htaccess'. Open the file in Editor.
- Copy the contents within it and save it on your Computer
- Now, replace the htaccess rules with the default rule mentioned here: https://wordpress.org/documentation/article/htaccess/#basic-wp
- Save the changes.
- Ensure that the translated post exists and is linked to the default one. Then, try accessing the translated post.
Please let me know how it goes. I'll be happy to help if you need further assistance in this matter.
The problem still is present. I checked and i dont have anything in the trash and both translations are also marked as "Done" in the WPML Translations-Tab.
I changed the stuff in the htaccess as told, but that didnt change anything.
Hi There,
Thank you for trying out the suggestions.
I tried to access your site, but I couldn't view the pages due to maintenance mode being enabled. Since the issue persists, could you please check if it continues to occur in a minimal environment? Here's how you can check:
1. Take a full backup of the site and database.
2. Once done, switch to a default theme like "Twenty Twenty-One" and deactivate all other plugins except for WPML, its addons, and Elementor.
3. Check the page on the frontend and see if you can access the other language version.
4. If that solves the issue, start activating the theme and plugins one by one. After activating each, check the frontend. This way, you'll be able to trace what exactly is causing the issue.
Let me know how it goes. If the issue continue to persists, I'll be happy to take a closer look and assist you further.
Best regards,
Prosenjit
The topic ‘[Closed] WPML always redirects me to default language’ is closed to new replies.
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.