This thread is resolved. Here is a description of the problem and solution.
Problem: The client was experiencing issues with the WPML language switcher. When the site was in English, the switcher displayed 'English' instead of 'Arabic', and vice versa. Additionally, activating WPML plugins caused a critical error for logged-in users, while guest users did not encounter this error.
Solution: Firstly, we advised the client to uncheck the "current language" checkbox in the WPML > Languages > Menu Language Switcher settings to hide the current language from the switcher. However, the issue persisted because the language switcher was not being served by WPML but by the Woodmart theme or another active plugin.
Regarding the critical error, we advised the client to activate WordPress debug to gather more information and open a new ticket for this separate issue, providing as much detail as possible.
If you're experiencing similar issues, we recommend trying the steps mentioned above. However, please note that the solution might be irrelevant due to being outdated or not applicable to your case. If the problem persists, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Should you need further assistance, please open a new support ticket at the WPML support forum.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Tell us what you are trying to do? about language switcher
Is there any documentation that you are following? no
Is there a similar example that we can see? no
What is the link to your site? hidden link
Hi
I tried to use wpml language swticher but when the language in english it's showing English written in switcher i want when english it should show arabic so if user enters the website in english when he click in arabic it will bring arabic and when in arabic it should show english
Inside WPML > Languages, there's a "Menu Language Switcher" section where you can edit the current language switcher and select specific settings for it.
You can UNCHECK the "current language" checkbox; that way, only the other language will show in the language switcher. The current language will always be hidden.
Please let me know if that helped you accomplish what you wanted.
I looked at the code and this is not the language switcher that is being served by WPML.
This is coming from either the theme or from one of the active plugins.
From what I can see, you are using the Woodmart theme so I think this has its own settings to handle the language switcher.
I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.
Our Debugging Procedures
I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to backup the site before providing us access. In the event that we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site.
- Please make a backup of the site files and database before providing us access.
- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box.
I am sharing the private fields once again with you below.
In regards to the fatal error that you experienced now, you can activate WordPress debug to find out more about what is actually happening when you receive that error (because the message that you see now is generic): https://wpml.org/documentation/support/debugging-wpml/
Also, please note that, per our Support Policy, we can handle only one issue per ticket.
Continuing with one issue per ticket helps not only supporters to focus on one issue at once, but also enables other users to find solutions to their questions faster.
So, I recommend that you open a new ticket when you have more info about that error. The WordPress log should give you more details on what exactly caused that fatal error. Also, please share with our colleagues WHEN you see that error: if you are doing a specific action that causes that error to show up. The more information you can share upfront, in the new ticket, the better and faster we can move with it.
Thank you for your understanding and cooperation.
I will be waiting for the credentials so that we can try to focus on the language switcher issue which was the initial issue reported in this ticket.
WPML was already active and I did NOT encounter any critical error.
As I mentioned initially, it seems that the language switcher was coming from Woodmart (the active theme) - it was not the one that comes from the WPML > Languages > Menu Language settings.
It was set here by the person who built the site: hidden link
I will attach screenshots below for all the areas.
Now, things work as you wanted: it shows English when you are in Arabic, and it shows Arabic when you are in English.
If you will still encounter fatal errors, please follow the steps that I shared in my other reply here (https://wpml.org/forums/topic/language-switcher-19/#post-15511043) and open a new ticket with all the helpful information that you can find about that so that we know how we can help you best.
From my understanding, the initial issue reported here was resolved. I'm happy to hear that! 🙂
Per our Support Policy, we can handle only one issue/request per ticket.
Continuing with one per ticket helps not only supporters to focus on one issue at once, but also enables other users to find solutions to their questions faster.