[Resolved] WooCommerce product slug translation not working per language
This thread is resolved. Here is a description of the problem and solution.
Problem: You are developing a WooCommerce site and want each language to use its own translated product base slug. However, updating the slug for one language changes it across all languages. Solution: 1. Deactivate all plugins and run troubleshooting options in WPML > Support > Troubleshooting. 2. Go to String Translations, search for "product" string and delete it. 3. Navigate to WPML > Settings > Post Type Translation and set translations for the slug in French. 4. Ensure that you use "product" with English as the language and do not alter it again. For adding or editing other translations, do so only from WPML > Settings > Post Type Translations.
If this solution does not resolve your issue or seems outdated, we 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 further assistance is needed, please open a new support ticket 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 developing a WooCommerce site and want each language to use its own translated product base slug. For example, English should use /product/, French should use /produit/, German should use /produkt/, Spanish should use /producto/, and Italian should use /prodotto/. I tried using WPML's String Translation to translate 'URL slug: product' and set a Custom Base per language in WooCommerce's Permalinks settings.
Symptoms:
Whichever slug I update last applies to all languages. For instance, if I set /produit/ in French, it works, but when I set /produkt/ in German, the French URLs also change to /produkt/.
Questions:
How can I ensure each language keeps its own product base slug independently?
Please update your WPML plugin and add-ons to the latest version, 4.8, to benefit from the latest bug fixes and improvements. This may not necessarily resolve your problem; however, we need to work with the latest code available to troubleshoot the issue effectively.
You can check the latest released versions under "My Account -> Downloads" on this site.
If you do not see the updates, you might need to click the Check for updates button in the Plugins → Add New Plugin → Commercial tab.
Please remember to backup your database before you proceed.
If the issue persists after an update has been done, please try the following:
1. Delete the product slug from WPML → String Transaltion
I updated WPML and all add-ons to the latest version.
I tried deleting the product slug from WPML → String Translation and removing the text, but it just reappears when I do that.
I resaved the permalinks in Settings → Permalinks. The links do show correctly as translated, but simply saving them doesn’t change anything.
On re-translating the product slug – are you suggesting I need to call it something different in Yoast? Ideally, I’d prefer not to do that as there are 750 products and it would take a very long time. Could you explain the reason why this step is necessary?
Please could you advise on the next steps? I can provide access to a staging site if you’d like to test directly.
Post types slugs needs to be translated in WPML > Settings > Post type translations, not in String Translations.
Please try this:
1. go to WPML > String Translation and delete the slug strings
2. go to WPML > Settings > Post type translations and translate the "Product" slug
3. go to Settings > Permalink and save the permalinks
Let me know if this helps or if you need further assistance.
Thanks for the pointers — I’ve tried all of those steps. You can see my screenshot link attached.
Just to clarify what I’m seeing:
I deleted the slug strings in WPML > String Translation, set the “Product” slug in WPML > Settings > Post type translations, and then saved permalinks in Settings > Permalinks.
However, the URLs still don’t update.
If I go into the WordPress Permalinks settings and select Italian, the slug still shows in English rather than the Italian translation I set.
In WPML’s Post type translations, the translated slugs do appear saved — so there seems to be a mismatch between what WPML shows and what the Permalinks screen (and front-end) are using.
I did previously experiment with String Translation for slugs, so I’m wondering if something from that is overriding or stuck. Do you have any guidance on how to fully reset/flush slug translations for the product post type so the permalink structure picks up the WPML values? Happy to provide anything else you need (debug info, temporary access, etc.).
- deactivated all the plugins
- ran troubleshooting options in WPML > Support > troubleshooting
- went to String Translations, searched for "product" string and deleted it
- went to WPML > Settings > Post Type Translation and set translations for slug in French
and it worked. I noticed that instead of just "product" the slug was "/product", not sure if this had an impact.
Thanks for your reply! I did try your setting, which was pretty much the same as what I had tested before, and unfortunately it led to the same outcome — it updated all the URLs, not just the French one.
I think the issue mentioned above is that it won’t delete the slugs or let me update the permalinks. Would you mind explaining specifically how you achieved that? When you say you did some debugging to solve it, what in particular did you do?
It’s a bit difficult for me to replicate this on the live site without knowing the exact debugging steps you followed.
I just tested your instruction on the staging site, and when I try it reverts back to updating all of them. So I basically I don't understand how you have done it?
You will see the staging site is now doing the same as the live