Hello!
When you use WPML, you’ll get a unique sitemap for each language. Please refer to our KB about same-site translation plugins.
If you are still finding issues, please share me the URL of your website, and I can give more direct pointers and validate if everything’s working as intended 🙂 Cheers!
Hello,
Thank you for your answer. I have looked at the documentation again and I can’t seem to solve the problem. The site is protected by a password (still in development). You will find below screenshots (optimized and normal sitemaps). Everything is ok on the normal sitemap but not on the optimized (url of the product are not the right ones).
– Optimized FR (base language)
see https://i.imgur.com/uUcdbbN.jpg

– Optimized EN (translated) -> incorrect domain and slug for products
see https://i.imgur.com/tJP5bka.jpeg

– Normal sitemap FR
see https://i.imgur.com/0G79GQE.jpeg

– Normal sitemap EN (translated) -> everything is fine
see https://i.imgur.com/2DojEr7.jpeg

Best regards.
Charly
-
This reply was modified 4 years, 9 months ago by
charly8953.
-
This reply was modified 4 years, 9 months ago by
charly8953.
-
This reply was modified 4 years, 9 months ago by
charly8953.
Hi Charly,
If my myopia serves me right, it’s the products’ base endpoint that is failing. An annoying but pertinent little detail. 🙂
On my testing server, I installed WooCommerce (I assume you use that), WPML Multilingual CMS 4.4.12, String Translation 3.1.10, Translation Management 2.10.8, and WooCommerce Multilingual 4.11.7, and no matter which configuration I could fantom, I could not get it to misbehave the way you’re experiencing.
Since TSF doesn’t generate those URLs (WordPress does), and since TSF doesn’t transform those URLs (WPML does), I think it’s best to reach out to WPML Premium support (I’m a mere volunteer here). TSF merely grabs the URLs via a common query and lists them in the sitemap.
Regardless of how support will work out with WPML, a workaround is simple: Do nothing. WordPress redirects the visitor automatically to the correct URL. You might get warnings in Google Search Console, however. To resolve those, you could fall back using the default WordPress Sitemap, which is beyond sufficient for most sites.