Skip Navigation

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

Problem:
The client is trying to maintain the default language slug for every translated post. The original language is English, but when translating to Spanish, the slug is automatically translated, resulting in a different slug than the English version. Additionally, the client encounters a 404 error when viewing the Spanish post because the URL does not include the '/es/' language code. After updating the post, the correct URL with '/es/' is generated, but the slug is still in Spanish.

Solution:
We recommend using the WPML Translation Editor instead of the WordPress Editor for translating posts. This is because when using the WordPress Editor, the post slug is generated from the post title, which is a standard WordPress feature. By switching to the WPML Translation Editor and re-translating the post, the slug should remain the same as the original language.

If this solution does not seem relevant to your situation, please open a new support ticket with us.

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.

This topic contains 1 reply, has 2 voices.

Last updated by Long Nguyen 1 year, 4 months ago.

Assisted by: Long Nguyen.

Author Posts
January 31, 2024 at 2:20 am #15246946

gabrielS-38

Tell us what you are trying to do?

I need to keep the default language slug for every translated post. My original language is english. So, If I my english slug is hidden link I need my spanish post slug to be: hidden link.

Right now it doesn´t seem to be working, because my spanish slug is :www.mysite.com/es/comiendo-una-manzana.

I have already set all my languages (english, spanish and portuguese) Encode URLS option to Yes. Then I have went to settings > Translated documents options > "Copy from original language if translation language uses encoded URLS". So I don't know what else I am missing. Please help.

By the way: Whenever I publish my translation in spanish and click view post, I get 404, becayse the slug does not includes /es/, like this: hidden link. This slug does not exists, because it is the spanish slug, which is not the default lang. Then, if I hit the "update" button, and click again in view post, worpdress takes me to the url for the spanish version: hidden link which works fine, except that, as I said, I need the slug in original lang (english). One thing to mention, is that I am using the WordPress Editor to translate, instead of WPML Translation Editor. That shouldnt be an issue I think, but just in case...

FYI: I have created a new post after setttings this options.

PD. I am in the first month. My trial will end February 7. I thought one month was more than enugh to test if WPML can do what I need, but I am running out of time. Is it possible for me to pay an extra money to have a couple of weeks more to continue testing? I am working on genexus.com, and WPML is the option that we choose, but we need to keep the slugs in english for every language, because we have a ton of posts that are currently using another translation plugin that we are about to drop, and the slug for every lang is in engilsh, and we need to keep that as is, because of SEO. Thanks in advance.

Is there any documentation that you are following?

https://wpml.org/forums/topic/disable-url-encoding-on-translated-pages/

Is there a similar example that we can see?

Nope

What is the link to your site?

Is local development.

Screenshot 2024-01-31 at 03.40.51.png
Screenshot 2024-01-31 at 03.19.08.png
2.png
01.png
January 31, 2024 at 9:10 am #15248096

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi Gabriel,

Thank you for contacting WPML support, I'd be happy to help you with this issue.

According to your screenshot, I see you are using WordPress editor to create the translation post. In this case, the post slug will be generated from the post title as the standard feature of WordPress.
You can switch to WPML Translation Editor > Re-translate the post and see how it goes.

Look forward to your reply.
Thanks