Home›Support›English Support›[Resolved] Display attributes' dropdown from English to other languages like French in the vendor's panel (da...
[Resolved] Display attributes' dropdown from English to other languages like French in the vendor's panel (da...
This thread is resolved. Here is a description of the problem and solution.
Problem: The client was experiencing an issue where the attributes' dropdown in the vendor's panel was not displaying in the correct language (French) consistently, depending on the language setting of the admin panel. Despite updating plugins and previously using a custom snippet code to handle translations, the problem persisted. Solution: We identified that the Litespeed cache was causing the issue, specifically the 'Cache WP Admin' setting. By deactivating this setting, the language display issue in the vendor's panel was resolved. Additionally, it was recommended to clear all cache and transients after deactivating the custom code to ensure that the attributes' dropdown displays correctly.
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 problems persist, please open a new support ticket at WPML support forum for further assistance.
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 want to display attributes' dropdown from English to other languages like French in the vendors' panel (dashboard). In the Admin panel, the attributes are displayed in the right language (translation in French). I just updated the plugins (WooCommerce Multilingual & Multicurrency and WPML Multilingual CMS). Before the issue from the vendors' panel (dashboard), I was using the following snippet code to display the attributes' dropdown in the right language: add_filter('woocommerce_attribute_taxonomies', 'testtranslateattributenew'); function testtranslateattributenew($found_product_categories){ $my_current_lang = apply_filters('wpml_current_language', NULL); foreach ($found_product_categories as $key => $cat){ $found_product_categories[$key]->attribute_label = apply_filters('wpml_translate_single_string', $cat->attribute_label, 'WordPress', 'taxonomy singular name: '. $cat->attribute_label , $my_current_lang ); } return $found_product_categories; } Now, I no longer need it after updating the plugins as there is no problem in the Admin panel. The actual issue is about only vendors' panel. See the link of short video for more details: hidden link
Symptoms:
When I am logged on as Admin in the French language, the vendor's panel displays the right language (translation in French); but when I switch to English in the admin panel, the vendor's panel switches also the attributes' dropdown even if the vendor is logged on in French language. It requires me to log on always in French as ADMIN in order to let the vendors' panel display the attributes' dropdown in French too. I expected to see attributes' dropdown displayed in French and not in English in the vendors' panel. Instead, I got attributes' dropdown displayed in English (original language) in vendors' panel.
Questions:
How can I ensure the attributes' dropdown remains in French in the vendors' panel regardless of the admin panel language?
Is it possible to make vendors' panel works like admin panel is working and independently of it?
Thank you for contacting WPML support, I’m happy to help you with this issue.
I understand the issue that you are experiencing, it looks like a caching query in the background when you visit the admin area in English language and also visit the frontend in French language, the taxonomy query (attribute) is cached somewhere and shows the attributes in English.
I suggest you follow some troubleshooting steps below and see if it helps:
1. Enable a minimal environment:
- deactivate all plugins except WPML plugins and B2BKing (specific LiteSpeed).
- switch to a standard theme of WordPress.
❌ IMPORTANT: Please backup your database and website before proceeding ❌
Thanks for your feedback. I have followed all the points you suggested but the issue is still occuring.
I have cleared all the cache from cloudflare, the cache in the server and the cache in Litespeed cache plugin.
I forgot to mention that the values of each attribute display in french once after i click on one in the dropdown (which still displays the attributes in English).
It could be a compatibility issue between WPML and B2BKing. To be able to report the compatibility issue we need to replicate the issue on a clean installation. I created a clean installation of WordPress, WPML, and all necessary WPML add-ons. You can access the WordPress dashboard using the link below: hidden link
Kindly follow the steps below:
- Don’t restore your site there.
- Install B2BKing plugin and necessary addon plugins.
- Try to replicate the issue with minimal steps.
- Then let me know the steps to replicate it.
This will help us report the issue to the compatibility team and solve the problem faster.
I have replicated the issue and it seems like the issue from the admin panel is still occuring. Indeed, if i want to display the dropdown in french, i need to activate the code snippet WPML sent me a few months ago.
The vendor panel displays also the dropdown in french when i activate the snippet. You can create vendor test account to verify from your side.
NB: What is strange is that i no longer need to activate the snippet on the live site in order to display the dropdown in french in the Admin panel.
The vendor panel displays also the dropdown in french
On the sandbox site, I don't see that issue on my end.
Test case 1:
- I login to the admin area with "demo" user and switch to French language.
- I login to the vendor dashboard with "boubakar.sa" user, it is in the English language. When I create a new product, I see the attribute in the English language.
Here is the hidden link" rel="noopener" target="_blank">screen record.
Test case 2:
- I login to the admin area with "demo" user and switch to English language.
- I login to the vendor dashboard with "boubakar.sa" user, it is in the French language. When I create a new product, I see the attribute in the French language.
Here is the hidden link" rel="noopener" target="_blank">screen record.
Can you please try to replicate the issue on the sandbox site and share a screen record of the issue?
There is no issue in your test because the snippet code was activated. I've just desactivated it. Try again; now you will see normaly the same issue like on my end.
Short video link: hidden link
NB: What is strange is that i no longer need to activate the snippet code on the live site in order to display the dropdown in french in the Admin panel.
There is no issue in your test because the snippet code was activated
Yes, you still need to activate the custom code on the sandbox site according to the issue in the previous ticket https://wpml.org/forums/topic/translation-of-attributes/
it has been escalated to our development team and we are working to fix this issue.
What is strange is that I no longer need to activate the snippet code on the live site
Please notice that the values are cached and transient-ed so you might have to purge WooCommerce cache and transients if you deactivate the custom code and still see the translation attribute or in case it doesn't work.
To clear the WooCommerce cache and transients, you can go to WooCommerce > Status > Tools and cache of plugin, hosting ...
I've cleared all cache and transients but the issue was still occuring. I tried to desactivate litespeed cache and YES it was the source of the issue.
I made many tests to find the exact wrong setting in litespeed which was related to the tab ''Cache WP Admin". So, i desactivated it and the issue is now resolved.
Many thanks for your help.
Regards
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.