[Resolved] I have issue translating the "Product Base" in the URLs
This thread is resolved. Here is a description of the problem and solution.
Problem: You have a website using Rehub and WooCommerce and want to change the language of the 'product base' in URLs for your products. Despite translating the product base from French 'banque-en-ligne' to English 'online-bank', German 'online-bank', and Italian 'banca-online', all products still show 'banque-en-ligne' in all languages. Solution: 1) Set the default product base to 'produit' for French and translate it accordingly for other languages. 2) Be aware that changing the slug might lead to 404 errors if the old slug is still used in posts or menus. To avoid impacting your live site, we recommend setting up a staging site to test these changes before applying them.
If this solution does not resolve your issue or seems outdated, please check the related known issues and ensure you have the latest versions of themes and plugins installed. If further assistance is needed, we encourage you to open a new support ticket.
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 have a website using Rehub and WooCommerce. I want to change the language of the 'product base' in URLs of my products. French is the original language. I translated FR 'banque-en-ligne' to EN 'online-bank', DE 'online-bank' and IT 'banca-online'.
Example:
FR: hidden link
EN is currently: hidden link but it should be: hidden link
Symptoms:
All the products still have 'banque-en-ligne' in all languages, despite translations.
Questions:
How can I change the language of the 'product base' in URLs for different languages using WPML?
Thanks for contacting WPML forums support. I'll be glad to help you today.
1) Could you please check if the issue persists in a minimal environment by following these steps?
1- Deactivate all the plugins except WPML CMS, String Translation, WooCommerce, and WooCommerce Multilingual.
2- Switch to a WordPress default theme like Twenty Twenty-one.
3- Go to WPML-> String Translation and delete the slug translation.
4- Go to WPML-> Settings-> Post Type Translation section.
5- Translate the product's slug.
If the issue is gone, activate them one by one to see which one is causing an interaction issue.
❌ Please backup your database before performing the above test ❌
2) Could you please share your Debug information with me?
You can read a detailed explanation about it here. (http://wpml.org/faq/provide-debug-information-faster-support)
The debug info will give me much information about how your site is configured.
Sorry, but I'm reluctant to disable plugins and change the theme. I'm too afraid of messing up my website which is up and running.
Perhaps an easy solution would be to change the product permalinks from 'Custom base' to 'Default value'? What do you think? Please see the attached screenshot.
Ok thanks. If I do it, will I have the word "produit" for all the languages? Or will I still be able to edit the languages to have: FR 'banque-en-ligne' to EN 'online-bank', DE 'online-bank' and IT 'banca-online' ?
Also what are the main risks linked to that manipulation?