This thread is resolved. Here is a description of the problem and solution.
Problem: The client is experiencing issues with product slugs not being translated correctly in different languages. Instead of having a unique translated slug, the slug appears cloned from another product with the word 'Copy' in Polish. The client wants to know how to ensure that product slugs are translated correctly without having to re-translate the entire product descriptions for 7000 products.
Solution: We recommend the following steps to address the issue with product slug translations: 1. Verify and adjust the slug translation settings by navigating to WPML → Settings. Under 'Translated documents options', set the Page URL to 'Translate' and save the changes. For detailed guidance, refer to this documentation. 2. After adjusting the settings, re-translate the products to update the slugs. This can be done without using additional translation credits if the content was previously translated, as translations are saved in the Translation Memory. For more information on how WPML tracks translations, visit Translation Memory documentation. 3. Unfortunately, there is no feature to translate only the slugs automatically without re-sending the entire content for translation.
If this solution does not resolve your issue or seems outdated, please check related known issues at https://wpml.org/known-issues/, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. If the problem persists, we highly recommend opening 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 trying to have product slugs be translated into other languages. You can see the issue on this page: hidden link.
Symptoms:
Instead of a properly translated product slug, I got a product slug that has been cloned from another product and contains the word 'Copy' in Polish multiple times.
Questions:
How can I ensure product slugs are translated correctly?
Why is the product slug showing the word 'Copy' in Polish multiple times?
Btw, image sync is broken too, I opened another ticket for it.
Please follow the steps described in this guide: https://wpml.org/documentation/getting-started-guide/translating-page-slugs/ and set the translation configuration for the slugs. Then update the translated products, make sure the slug is properly translated, and double-check if the issue has disappeared.
By default, when you send pages and posts for translation, WPML automatically translates their URL slugs using the title.
For example, when translating a page titled ‘Mixed Berry Smoothie’ into Spanish, WPML will use the new page title, ‘Batido de Bayas Mixtas’, when creating the URL:
smooothy.com/es/receta/batido-de-bayas-mixtas/
This is exactly the behaviour I am looking for and it is enabled by default as the docs say, but it just doesn't happen for my products.
How to reproduce:
1. Clone the latest product, change the title, description. (Note the original title with Copy string appended)
2. Publish the product.
3. Go to translation management, auto translate the new product into English and German.
4. Go back to products, verify title and description is translated, but the slug in English and German remains as if it was created right after clicking Duplicate (with Copy appended) and hasn't been updated to match the translated post title.
It is set to generate automatically from the title. It just seems like it is generated when the product is duplicated and then not updated when the product title is auto translated. Please try to follow by reproduction steps and tell me if this is a bug.
Please follow these steps:
- Go to WPML → Settings and scroll down to Translated documents options.
- Under Page URL, choose the Translate option and save. (hidden link)
Ok, I set it to translate slugs and after re-translating a few products, the slugs do get updated.
Even though the setting is changed, no products showed up with "needs updating" translation status. All products are still marked fully translated. When I selected those fully translated products for auto translation, I can't click the button unless I also check to overwrite all existing translations, which I presume does the entire translation from scratch.
Is there a way I can translate all the slugs for my 7000 products all at once without re-translating the descriptions?
The behavior you are describing is the correct one and the expected one. Unfortunately, there is no way to automatically translate only the slugs, so you will need to resend the content for translation.