Skip to content Skip to sidebar

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 Mohamed Sayed 1 year, 4 months ago.

Assisted by: Mohamed Sayed.

Author Posts
March 31, 2024 at 12:36 am #15466965

gabrielS-38

Tell us what you are trying to do?
I have three languages:
- english (original)
- spanish
- portuguese

I want to translate the categories slugs. The problem I have is that for some categories, the slug is the same in spanish as well as in portuguese, for example:

spanish: plataforma-genexus
portuguese: plataforma-genexus

I think because of this WPML is adding a number to one of them. The final result is like this:

spanish: plataforma-genexus
portuguese: plataforma-genexus-pt

Why is this? The urls already have a lang code, that differentiate the two categorties:

hidden link
hidden link

So why does WPML needs to differentiate the categories slugfs? Is there a fix for this?
Thanks in advance.

Is there any documentation that you are following?
Nope

Is there a similar example that we can see?
Nope

What is the link to your site?
It is a local development site.

cat-translation-pt.png
cat-translation-es.png
March 31, 2024 at 2:35 pm #15467398

Mohamed Sayed

Hi,

The language code is added to the translated taxonomy slug because WordPress API does not allow having more than one occurrence of a slug for a specific taxonomy.

Since they're in different languages, you can try the following steps to edit the translated slugs:

1. Go to Posts > Categories
2. Switch to the second language from top admin bar
3. Find the translated category and click "Quick Edit"
4. Remove the language code form the slug
5. Click "Update Category"

Please check here for more details: https://wpml.org/errata/translated-term-slug-identical-to-the-original-term-slug/

Kind regards,
Mohamed