Home›Support›English Support›[Resolved] Syncing WooCommerce product variation language with WPML site language
[Resolved] Syncing WooCommerce product variation language with WPML site language
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is trying to synchronize WooCommerce product variations with the active WPML language on their development site. Specifically, they want the default product variation to automatically switch to match the WPML language when the site language is changed. Solution: We have evaluated the possibility of setting different default WooCommerce variation values per language. However, we decided not to implement this feature. The reason is that WPML's current logic ensures consistent synchronization of product data across translations. Supporting localized default variations would require significant changes to this logic, and our translation model focuses on translating—not localizing—product structure. Therefore, this feature falls outside our current scope.
If this solution does not address your issue or seems outdated, we recommend opening a new support ticket. We also 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. For further assistance, please visit our support forum at 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.
Background of the issue:
I am trying to synchronize WooCommerce product variations with the active WPML language on our site under development. We have multiple WooCommerce products, each with several variations, including language as a variation attribute (e.g., EN, NL, IT). When a user switches the website language via WPML, the product page should automatically select or display the corresponding language variation.
Symptoms:
No specific issue or error message mentioned.
Questions:
Is this behavior possible with WPML and WooCommerce Multilingual?
How can we best achieve automatic selection of the correct language variation when switching languages?
If this approach isn’t supported, what would be the recommended setup to ensure users land on the correct language variation of each product after switching languages?
If a user is checking a product in a language, selects a variation and THEN changes languages, the choices are reset. Just like it is, when refreshing a page. That's how WooCommerce works.
That only happens in a very specific scenario, where a user switches languages mid-process. Let me know if this answers your question.
Thanks for your reply! It’s not about resetting. What I want is that when a customer is on the French version of the website, they automatically get the “French” variation instead of the default one. In short: I’d like to set the default variation per language. Is that possible?
It seems that what you're describing is how WPML works by default.
Let me explain what the expected behavior is:
If a user is checking the website in French, and the products are translated and available in French, he will see all products and their variations in French.
To achieve that, you need to ensure that in WPML > Settings > Post Types Translations, Products are set to "Translatable - only show translated items". Also, the variable products must be translatable.
If you have these settings, and are having different or unexpected behaviors, please let me know and send me examples I can check myself.
I don’t think you quite understood what I meant, so I’ll try to explain it again.
1. I have a product in WooCommerce
2. This product has multiple variations, including one for languages
3. The default variation in WooCommerce is set to “English,” just like the site language
4. When I switch the site language from English to French, I want the default variation to switch from English to French as well
If I understood it correctly, you are creating a product variation for each language, correct?
This is not how WPML works, unfortunately. WPML handles language through translated products, not through variation attributes. Variations should be used for things like size or color — not language.
WPML will not automatically switch product variations based on the active language. To display the correct language version of a product, you need to create separate translated products using WPML’s translation system.
If you need different content or descriptions per language, this should be configured separately for each translation — not using variation attributes.
No, you’re not understanding it correctly. I have a product, for example an e-book, which is available in multiple languages. These can be completely different languages than the ones set up in WPML.
This e-book has a default variation set to English. If I switch the WPML language to French or German (for example), I want to be able to change the default variation. Whether that’s French, German, Spanish, or Portuguese doesn’t matter at all. I just want to have the option to set it.
I apologize, but I can't understand it based solely on your description. Can you please send screenshots, or preferably a video, showing what you wish? Please use Loom to send me a video explaining the desired behavior.
I can’t make it any clearer than this: I need the default option to be adjustable based on the selected language. If that’s still unclear, feel free to check with your colleagues as well.
Thank you so much for clarifying, I was able to understand it now. I got confused because the variations are also languages, which is unusual.
Unfortunately, WPML does not offer that feature. It's not possible to edit the “Default form value”, based on language. I tried on a fresh installation in different ways, but this field is blocked when checked in other languages. Let me know if you have any other questions.
I've created a feature request, it's being analyzed internally by upper management. It's very unusual that feature requests get implemented quickly (in less than a few months), as they depend on number of requests and complexity of implementation. I can't give you a deadline on that.
I'll keep you informed. Thank you for your patience.
Thank you for your suggestion regarding setting different default WooCommerce variation values per language. After evaluation, we’ve decided not to implement this feature. This is because WPML’s current logic ensures consistent synchronization of product data across translations, and supporting localized default variations would require significant changes to this logic. Additionally, our translation model focuses on translating—not localizing—product structure, and this feature falls outside that scope.