Home›Support›English Support›[Resolved] when a user registers with non-Englisgh languuage and logs to theit control panel, its interface is ...
[Resolved] when a user registers with non-Englisgh languuage and logs to theit control panel, its interface is ...
This thread is resolved. Here is a description of the problem and solution.
Problem: If you're developing a site and want to enable switching the WordPress account interface to the user's language of preference using WPML, but find that when a user registers with a non-English language and logs into their control panel, the interface remains in English. Solution: We recommend adding the following custom code to your theme's functions.php file:
Please test this code in a staging environment before applying it to a live site, as this custom code is a courtesy and is not officially supported by us.
If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, 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. If needed, please open a new support ticket at our 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.
Background of the issue:
I am developing a site and want to enable switching the WordPress account interface to the user's language of preference using WPML.
Symptoms:
When a user registers with a non-English language and logs into their control panel, the interface is still in English.
Questions:
How can I enable the WordPress account interface to switch to the user's preferred language?
Thanks for contacting WPML forums support. I'll be glad to help you today.
1) Please go to Users -> Profile, change the language using the language dropdown menu, and update the profile.
2) Could you please share your Debug information with me?
You can read a detailed explanation about it here. (http://wpml.org/faq/provide-debug-information-faster-support)
The debug info will give me much information about how your site is configured.
Thanks for your update. I would need to look closely at your site, so I would need to request temporary access (WP-Admin and FTP) Preferably to a test site where the problem has been replicated.
Your answer will be private, meaning only you and I can access it.
❌ Please backup your database and website ❌
✙ I need your permission to deactivate and reactivate the plugins and themes and change site configurations. This is also why the backup is critical.
✙ I also need your permission to take a local copy of your site to debug the issue without affecting your live site.
Our developer told me that there are differences (hardwired in WordPress) in privileges between different users assigned to "Administrator" roles, with the main user with ID1 still having more privileges. I've assigned your account the highest privilege possible (Administrator). If this does not work for a particular purpose, the least troublesome way would be for me to install the required plugin for you. What is the plugin address?
Thanks for creating the package. I installed a local copy of your site and was able to fix the issue by adding the following code to the functions.php file.
Please note that this custom code is a courtesy and is not officially supported by the WPML team. Please test it in a staging environment before applying it to a live site.
The code is implemented and we are much closer to completeness.
Still, there are peculiarites of how the language switches function acroiss the site and contexts.
We have 3 types of language switches (screenshots with the respective numbers in filenames):
1) main top switch on the frontpage / other content pages of the site;
2) switch in the user settings of the dashboard (WP native one)
3) top switch in the dashboard
What is happening is that switch #1 works fine on the sites content but does noty affect the dashboard
Switch #2 changes the user's language environment in the dashboard
Switch #3 helps ADMINS to navigate multi-langauge content in the dashboard (it is not helpful to the regular user, though).
So, the ideal world solution would be to have switch #1 as a "Master Switch" to affect everything, from site content to the dashboard environment. But we realize this may or may not be possible. Given the current functionality, hiding the switch #3 from a regular user (not admin) may be a working solution. Or maybe we are missing something and you can suggest a better solution?
1) This front-end language switcher only works on the front-end content.
2) This is not a language switcher; it's an option that says which language the strings of the dashboard will appear to that user. It's unrelated to the content, pages, posts, products, etc.
3) This dashboard language switcher switches the language in the dashboard to see different content in different languages.
The front-end language switcher can't be a master switcher for the front-end and dashboard.
To our latter question from the previous message ("hiding the switch #3 from a regular user (not admin)") - this may improve useability for the confused regular user. Could you suggest a way / a script to hide the top language switch in the dashboard from the regular (non-privileged) user?