Home›Support›English Support›[Resolved] The language changes when switching between the site pages and the profile.
[Resolved] The language changes when switching between the site pages and the profile.
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is experiencing an issue where switching between the profile and the main page results in being taken to different language versions of the site. Specifically, navigating from the Ukrainian or Russian version to the main page redirects to the English version instead of staying on the same language. Solution: 1. We found that the menu links for the profile were not translated. To resolve this, we recommend creating a Custom Link in the menu for the profile page in each language. This can be done by visiting the profile in each language, copying the page URL, and then adding it as a Custom Link in your menu. 2. If clicking the profile icon redirects to the profile in the default language, this is due to the theme generating the link dynamically based on the user's session. This behavior is not translatable by WPML and would need to be addressed by the Theme Author.
It appears that this specific link is set up via a 3rd party plugin, via JS. Currently, the developers are looking into the issue on a copy of your website, I'm sorry it is taking that long, but our queue is a bit busy due to the holidays. I'll update you as soon as I have feedback.
Hello!
We sincerely thank you for your work and understand your busy schedule.
We would be very grateful if you would let us know more specific terms in which this problem can be solved, the planning of our team's work depends on it. For example, one week or several days...
It is very important for us!
Thanks for understanding!
I got feedback from our development team. They were having issues reproducing the error, as it was working on a local copy they made. After re-implementing the solution I suggested you (to translate the menus and clear the cache), the website is working as expected.
I suggest you re-implement the solution to see if it works this time (it should, as the issue seems to be cache related).
1) Go to Appearance > Menus and select the Loggedin Menu UA;
2) On the bar above the menu items select a second language (Ukranian, for example) by clicking on the pencil next to it;
3) Select the first menu item "<span class="vicon vicon-home"></span>Головна";
4) Add "/uk/" to the end of the link, to indicate it must be the home page in Ukranian;
5) Do the same for Russian, adding /ru/;
Please share your results with me. Unfortunately, I cannot give you an exact dead-line, as we couldn't really reproduce the issue. If the recommended steps don't work, I'll ask for site access to make a fresh copy of your website, so we can maybe reproduce the issue.
I apologize for the back and forth, but in this case, it was difficult to reproduce the error + the busy queue we are having.
When switching from the personal account to the main page of the site, the language does not change - that's great! But when we go from the main page to the personal account again - there is still a problem...
Thank you for the feedback 🙂 After further investigating your issue, we found out a few things:
1. The menu links for the profile weren't translated. So it was the same issue as before. Please add the proper link for the profile. To solve this, you can visit the profile in each language, copy the page URL and create a Custom Link to it in your menu. (see attached image as an example)
2. When clicking the profile icon itself, you might be taken to the profile in the default language. That happens because the theme generates that link dynamically, based on the user's session. Unfortunately, that's not translatable by WPML and can only be solved by the Theme Author.
Please tell me if #1 works for you and if you need any assistance.