This thread is resolved. Here is a description of the problem and solution.
Problem: You are trying to maintain a consistent URL structure between your main site and the translated version using WPML. On your main site, the URL is site.com/watch-straps/nato, but on the translated site, it changes to site.com/sv/produkt-kategori/klockarmband/nato-sv/. Solution: This issue is recognized as a known problem related to the Rank Math SEO plugin where turning on 'Strip Category Base' causes issues with secondary languages. We are currently working on a fix for this. In the meantime, we recommend not translating the category, product, or product-category slugs. The untranslated terms won’t be visible in the URL anyway when you use any of those options. For more details, please check the known issue here: Rank Math SEO and WPML URL structure issue.
If this solution does not apply to your case, or if it seems outdated, 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 you still need assistance, please open 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 maintain a consistent URL structure between my main site and the translated version using WPML. On my main site, the URL is treband.com/watch-straps/nato, but on the translated site, it changes to hidden link.
Symptoms:
The URL structure changes between the main site and the translated version.
Questions:
How can I change the URL structure so it is the same for both the main site and the translated version?
To change the product slug (URL) in the secondary language, you must first include it in the translation.
Here is an outline of the steps:
1. Go to WPML → Settings → Translated documents options and choose "Translate" (this will include the slug in the translation and not create it automatically from the title).
2. Make slight modifications to the original page and save it.
3. Go to the WPML translation editor. Now, the URL is included.
4. Make changes to the slug and complete the translation.
If the product is already translated and you need to change the URL of the translated product, then yes, you need to do this.
If this is not what you are asking, please elaborate a little more so I can better understand. Sometimes, screenshots illustrating what you mean may go a long way to clarify what words fail to convey. If you'd like, you can use the "upload an image" option below the comment area.
It's not that I want to translate the URL, but the Swedish version doesnt hold the same structure. Please see attached photos. This is the same corresponding pages, one in the English version and one in the Swedish version. The Swedish version has "produkt-kategori" in it, but as you can see that is removed in the English version which is the default one.
Thank you for the explanation. I understand it clearly now.
Do you use any plugins that can remove the category from the URL? What happens if you temporarily disable all plugins except WPML, WooCommerce, and WooCommerce Multilingual?
We’re working on a fix for this issue. In the meantime, do not translate the category, product or product-category slugs. The untranslated terms won’t be visible in the URL anyway when you use any those options.
This should exclude the product-category slug from the secondary language. As a result, the link becomes hidden link, which will match the structure of the original hidden link. Do you think it will affect your site's SEO if the English part of the URL is excluded?
If possible, I need to request temporary access (wp-admin and FTP) to your site where the problem has been replicated to be of better help. When you log in to leave your next reply, you will find the needed fields below the comment area. The information you will enter is private, meaning only you and I can see and access it.