Skip Navigation

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 1 reply, has 2 voices.

Last updated by Prosenjit Barman 1 year, 9 months ago.

Assisted by: Prosenjit Barman.

Author Posts
August 25, 2023 at 5:41 pm #14293495

sfdam

Hi,

I have Danish as my default language and English as a translation. In WooCommerce, how can I translate the Product Attributes slug? I have created an attribute (under Products =>Attributes) named "Farve" in Danish ("Color" in English). I have then created product variations based on the terms of that attribute. I can translate the name under WPML => Taxonomy Translation (See attached image). How do I change the slug of this? When I have added a variant to the cart (say green) and visit the cart and then click the product in the cart (so I get back to the product page with the variant selected) it will have the query string "attribute_pa_farve" in the URL (see image) with the translated term. I.e. in Danish, it will say "?attribute_pa_farve=groen" and in English, it will say "?attribute_pa_farve=green". How do I translate the slug so it says "?attribute_pa_color=green" in English instead of "?attribute_pa_farve=green"?

Thanks

Søren

shows_attribute-pa-farve_in_english.png
wpml-taxonomy-translation.png
August 28, 2023 at 8:35 am #14298251

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello Søren,
Thanks for contacting WPML Support. Sorry for the delay in responding due to the weekend.

I understand what you're looking for. Unfortunately, the part after "attribute_pa_" cannot be translated into other languages. Multiple complexities are involved with it and without modifying the core WooCommerce code, it will not be possible to translate that part for now. I hope you can understand.

If the Archive is Enabled for the Attribute, you can change the Archive URL for that attribute by going to "WooCommerce > WooCommerce Multilingual & Multicurrency → Store URLs".

If there is anything else if you need help, please let me know.

Best Regards,
Prosenjit