Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client needs the same category slug for certain product categories across original and translated languages. However, WPML defaults to the original slug and adds a suffix with the short language code for the translation. Attempts to manually set the same slug are not saved, and WPML may revert the slug or add a '-2' suffix.
Solution:
We recommend using the 'Quick Edit' option to manually set the same slug for categories in different languages. Here are the steps to follow:
1. Navigate to Products >> Categories list page.
2. Use the admin language switcher to select the secondary language.
3. Click the 'Quick Edit' link on the category you wish to update.
4. Change the slug and press the 'Update category' button.
For more details on this issue, you can check the errata page here: https://wpml.org/errata/translated-term-slug-identical-to-the-original-term-slug/

If this solution does not resolve your issue or if it seems outdated or irrelevant to your case, we 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. If further assistance is needed, please open a new support ticket at WPML support forum.

0% of people find this useful.

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 Noman 9 months ago.

Assisted by: Noman.

Author Posts
September 28, 2024 at 5:02 pm #16232351

cristianB-27

Background of the issue:
I need the same category slug for certain categories of products, across the original and translated language. I have translated my categories and noticed for certain categories, WPML defaulted to original slug and added the suffix with the short language code for translation.

Symptoms:
WPML defaulted to original slug and added the suffix with the short language code for translation. Then, if I manually enter the same slug (or use Copy from Original) and Save and want to check the result, it looks like the change is not saved and WPML reverts the slug back to what it was or even adds -2 as suffix. This does not happen for categories where I enter translated slugs

Questions:
How can I ensure the same category slug for certain categories of products across the original and translated language?

September 29, 2024 at 6:29 am #16232710

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting WPML Support. The category slug should be unique; this is the default behavior of WordPress. A category in the secondary language is still a new category for WordPress that’s why it cannot have the same slug.

But there is a workaround for this: if you edit the taxonomy via the "quick edit" option, you should be able to change the slug and use always the same. You can do this by following the below steps:

1. Go to Products >> Categories list page.

2. Select the secondary language using the admin language switcher.

3. Press the Quick Edit link on the category in which you want to update the slug.

4. Update the slug and press the Update cateogry button as you can see in the attached screenshots.

This issue also reported to our developers, you can see more details here:
https://wpml.org/errata/translated-term-slug-identical-to-the-original-term-slug/

Please let me know if this resolves your issue or if you need further assistance with this issue.

Thank you

Quick_edit_product_category.png
slug update.png
now it will not add prefix.png
September 29, 2024 at 9:22 am #16232934

cristianB-27

hi, this seems to be working, thank you