Skip Navigation

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.

Tagged: 

This topic contains 8 replies, has 2 voices.

Last updated by aboubacarS 5 months, 3 weeks ago.

Assisted by: Long Nguyen.

Author Posts
October 14, 2024 at 11:34 pm #16288062

aboubacarS

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?

October 15, 2024 at 4:55 am #16288428

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi Aboubacar,

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 ❌

2. Increase WP memory limit: please check this link for more details
https://wpml.org/home/minimum-requirements/.

Looking forward to your reply.
Thanks

October 15, 2024 at 2:46 pm #16291489

aboubacarS

Hello Long,

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).

Short video link: hidden link

Thanks for your support

October 16, 2024 at 2:33 am #16292941

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

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.

Thanks.

October 17, 2024 at 2:31 am #16298071

aboubacarS

Hello Long,

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.

Short video link: hidden link

Thanks for your support

October 17, 2024 at 6:49 am #16298282

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

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?

Looking forward to your reply.
Thanks

October 17, 2024 at 4:52 pm #16301574

aboubacarS

Hi Long,

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.

Thanks for your support

October 18, 2024 at 1:30 am #16302391

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

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 ...

Thanks.

October 18, 2024 at 1:09 pm #16304914

aboubacarS

Hi Long,

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

LITESPEED SETTING ADJUSTEMENT.JPG