Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 -
- 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 -

Supporter timezone: Asia/Dhaka (GMT+06:00)

This topic contains 7 replies, has 2 voices.

Last updated by Prosenjit Barman 9 months ago.

Assisted by: Prosenjit Barman.

Author Posts
September 1, 2024 at 4:16 pm #16129324

kisa

Background of the issue:
I manage custom categories for products in WPML. For instance, I have a category called 'characters'.

Symptoms:
The 'characters' category has duplicates in English, which also appear in the first language. When creating a product in the first language, I see two 'character A' categories, making it unclear which one to choose.

Questions:
Why are there duplicate categories?
Why do the duplicates appear even if not in English?

September 2, 2024 at 8:50 am #16130613

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thanks for contacting WPML Support.

I understand the issue you're facing. Please note that if you’ve translated the product category using the WooCommerce Multilingual plugin, that category should only appear in the secondary language, not when creating the default product.

If you see the category from the secondary language while creating a product in the default language, it may be due to a category synchronization issue. Please try the following steps and check if they help in solving the issue.

- Please go to `WooCommerce > WooCommerce Multilingual > Category` tab
- Make sure that the category is translated and it has a unique slug.
- Scroll down and you'll see a button to Synchronize Attributes. Click on that and wait till the synchronization is completed.
- Go to WPML > Support > troubleshooting
- Click on the following buttons:-

-- Synchronize posts taxonomies [Select 'Product' from the dropdown and then click the button]
-- Clear the cache in WPML
-- Assign translation status to duplicated content
-- Set language information
-- Fix post type assignment for translations

Once done, clear the caches from your site and browser and then try again.

Let me know if that helps or if you need further assistance in this matter. I will be happy to help.

Best regards,
Prosenjit

September 2, 2024 at 9:30 am #16130729

kisa

Hello,

thank you for your anwer, I didn't translate the product category with the WooCommerce Multilingual plugin, I only use WPML and I setted in the parameters to not translate my customs category but it seems it does it anyway.
There is always a "-en" attached.

I would like to try your solution but right now I opened another ticket because it seems there is an issue with this plugin "WooCommerce Multilingual" and WPML.

But if I never used WooCommerce Multilingual, does the problem can come from here?

September 3, 2024 at 4:59 am #16133856

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
Thank you for the update and for providing additional details.

If the custom category you're referring to is linked to WooCommerce, it's essential to keep the WooCommerce Multilingual plugin active and translate the category and other WooCommerce taxonomies through it. This ensures that the language information is correctly propagated with the translated taxonomies, allowing them to display properly across different languages.

Therefore, I recommend trying the suggestions I shared in my previous message, as they may help resolve the issue.

I see that you've also opened another ticket with WooCommerce Multilingual, which is a good step. Once the other issue is resolved, please try the solution I shared after that.

Feel free to let me know if you need further assistance or clarification. I will be happy to help.

Best regards,
Prosenjit

September 3, 2024 at 6:37 pm #16137491

kisa

Thank you for your messages, I'm now trying your method but I'm stuck early on :
- Please go to `WooCommerce > WooCommerce Multilingual > Category` tab
- Make sure that the category is translated and it has a unique slug.

I went in "Custom taxonom", and only one appears, but I have two more.

For the one that appear, I can't have a unique slug, when I try to put the same slug as in french, it always adds "en" or "en-2" for instance, see screenshot here :
hidden link

What should I do please?

September 4, 2024 at 4:55 am #16138269

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thank you for the detailed update.

If the terms do not appear in the Custom Taxonomy section, it may indicate that the taxonomies haven't been saved correctly or there could be issues with the taxonomy translation settings. Please try the following steps and check if you can see the taxonomies correctly.

- Navigate to WPML > Settings and scroll down to the Taxonomy Translation section.
- Ensure that the translation preference for your custom taxonomy is set to "Translatable - only show translated items."
- Next, go to the custom taxonomy you’ve created.
- Open the term that does not appear in the Custom Taxonomy section of WooCommerce Multilingual.
- Make a small edit to the term and save the changes.

Check if you see the term in the custom taxonomy section of WooCommerce Multilingual.

The issue you're facing, where slugs like "en" or "en-2" are automatically added, usually happens when the same slug is already assigned to another term in the same taxonomy (such as categories or tags) or to other content like posts or pages. WordPress requires slugs to be unique across the entire site to prevent conflicts. When you try to use the same slug for both the French and English versions, WPML attempts to make the slug unique for each language, which results in the language code being added to the slug.

If you use a different and unique slug for the English version, the language code will not be added to the slug.

I hope you can understand. Feel free to let me know if you need further assistance or clarification in this matter. I will be happy to help.

Best regards,
Prosenjit

September 4, 2024 at 5:27 pm #16142125

kisa

Thank you for your detailed answer Prosenjit, I'm sorry because I'm having a hard time understanding this...

I understood for the custom taxonomies, it's because I set them as "non translatable", because I don't want them to be translated, I want them to be the same across the two languages. For instance one is a taxonomy like "brands" so a brand is not translatable, it always have the same name.
So even if I want that, do I need to set them as "Translatable - only show translated items." ?

September 5, 2024 at 6:22 am #16143172

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
Thank you for the update. I’ll do my best to explain everything clearly and am happy to provide further clarification if needed.

Since your custom taxonomy, like "brands," doesn't need to be translated and should remain the same across both languages, you don’t need to set it as "Translatable - only show translated items."

Instead, you can keep it as "Non-translatable" in WPML settings. This way, the taxonomy will be the same in both languages, and there’s no need to create separate translations for it.

The "Translatable - only show translated items" option is useful when you want to translate terms and show different versions of the taxonomy in each language, but since you want "brands" to be consistent, leaving it as non-translatable is the correct choice.

However, with that setting, if you duplicate the taxonomy, consider adding an identifier to the duplicated taxonomy. This way, when selecting the taxonomy for a product, you can easily identify and choose the correct taxonomy.

I hope you can understand. Feel free to let me know if you need further assistance or clarification on this matter. I will be happy to help.

Best regards,
Prosenjit

The topic ‘[Closed] Duplicate categories’ is closed to new replies.