Skip Navigation

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

Problem:
The client needs to translate page slugs in multiple languages except for Chinese, where they want to keep the original slug untranslated. They were unable to find an option to exclude only one language from slug translations and had issues reverting already translated slugs.
Solution:
We advised the client to navigate to WPML > Settings > Translated documents options. Under Page URL, they should select the Translate option and save the changes. This setting allows the slug to appear in the translation editor, where the client can choose to either copy the original slug manually or translate it for each language. For existing pages, after applying this setting, the client should update the page or post in the default language and then access the translation editor to see the option to translate the slug.

If this solution does not apply to your case, or if it seems outdated, we highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If issues persist, please open a new support ticket.

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 3 replies, has 2 voices.

Last updated by Bobby 11 months ago.

Assisted by: Bobby.

Author Posts
May 8, 2024 at 9:34 pm #15607922

kenM-6

Tell us what you are trying to do?

We have 3 languages for translations. One of these languages is Chinese. We don't want slugs to be translated in Chinese, but we do want slugs to be translated in other languages.

Is there any documentation that you are following?
https://wpml.org/documentation/getting-started-guide/translating-page-slugs/

Is there a similar example that we can see?
This is a close example but there is no solution there that applies to us: https://wpml.org/forums/topic/i-need-to-translate-a-page-slug/

Our current translated pages have the slug translated already and we would like to revert that, or manually edit it somehow, but we don't see an option for that. Ideally, we do not even want to have to do that. Ideally, we can choose slugs not be translated in Chinese only.

What is the link to your site?
hidden link

May 8, 2024 at 11:15 pm #15607978

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi there,

Unfortunately, no feature would allow you to disable this for one language or even all languages.

Please go to WPML->Settings->Translated documents options -> Under Page URL, choose the Translate option. Click Save

This will allow you to 'translate' the slug, meaning that when you go to add a translation you will see the option to translate the slug in the translation editor.

that way you can either choose to 'copy' it over (manually) or translate it.

Try this and let me know your results, please.

May 13, 2024 at 1:35 pm #15621157

kenM-6

Hi Bobby,
We changed that option but we still don't see the slug as a field we can translate in the translation editor. But we decided we will just update the slugs in the database.

May 13, 2024 at 9:54 pm #15622630

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Thank you for updating me, and happy to hear you were able to find a workaround.

For existing pages after changing the option in settings, update the page or post in the default language and then open the translation editor, you should be able to see the option to translate it then.

May 15, 2024 at 7:25 pm #15632129

kenM-6

We found that editing the slug from the database actually did not help.

This is the solution we found:

In WPML > Settings > Translated Document Options > Page URL > Set "Copy from original language if translation language uses encoded URLs"

In WPML > Languages > Edit Languages > set Encoded URL to "Yes" for Chinese language

Then go into every page, open in the translated error, and simply republish. This reverted the URL to english for us.

Thanks