Skip Navigation

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

Problem:
If you're experiencing gibberish in the URLs of your translated pages from English to Chinese, such as

https://www.domain-name.com.cn/%e8%b0%a2%e8%b0%a2%e6%82%a8%ef%bc%81

instead of a human-readable format, this is due to URL encoding, commonly known as percent-encoding.
Solution:
We recommend using the "Copy from original language if translation language uses encoded URLs" option. This will copy the original slug instead of using encoded URLs for the translated pages. You can find detailed steps on how to do this in our documentation:

If this solution doesn't look relevant to your issue, please open a new support ticket and we will be happy to assist you further.

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

Last updated by Marcel 3 months, 2 weeks ago.

Assisted by: Marcel.

Author Posts
January 9, 2024 at 4:41 pm #15165908

jeremyL-10

There is gibberish in the URLs in all of our translated pages from English to Chinese.
For example, we created a thank you page in English:

hidden link

Then we translated the page into Chinese, but we notice that the URL to the Chinese page is like this:
hidden link

This problem exists for all translated pages.

How to avoid gibberish in the URLs?

January 9, 2024 at 5:08 pm #15165986

Laura
Supporter

Languages: English (English ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

Hi,

thanks for contacting us.

What you see it's not gibberish but it's how browser reads Chinese characters and WPML can't do anything about it.

If you click the link you'll see the link displayed correctly

uXoqOurURa.png
January 9, 2024 at 6:19 pm #15166208

jeremyL-10

Well, it is gibberish for humans and that is what matters.
And it is not good for SEO either, so it matters for machines too.

And I think it is not true - that you can't do anything about it.

WPML should have an option for users to specify a naming convention for translated page URLs.

Right now, we have to manually switch to the Chinese version of the page and edit the URL by hand, for example, we changed the Chinese version of this page to /thank-you-zh/.
When you have hundreds of pages on your site, this is a tedious process.

Again, I strongly urge WPML to provide a URL naming convention option during the translation process.

January 9, 2024 at 6:49 pm #15166237

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02:00)

Hi,

what you see is regular URL encoding called "percent-encoding" (hidden link).

You can use the "Copy from original language if translation language uses encoded URLs" option as described here: https://wpml.org/documentation/getting-started-guide/translating-page-slugs/#sending-post-or-page-slugs-to-translators, so it will copy the original value instead using encoding.

Best Regards
Marcel

January 9, 2024 at 7:25 pm #15166319

jeremyL-10

Hi Marcel,

Thanks, your answer makes much more sense than your colleague's.
Just to clarify, if we use the "Copy from original language if translation language uses encoded URLs" option, will WPML add a suffix to the URL to distinguish the translated page from its original?

January 10, 2024 at 10:48 am #15168111

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02:00)

Hi,

copy means it will always copy the original value 1:1 and show it with a language suffix. If Chinese is your default language, it will be copied in Chinese and shown with /en together with the Chinese letters.

For example, we created a thank you page in English... Then we translated the page into Chinese, but we notice that the URL to the Chinese page is like this:

Chinese is your default language. You created the page in Chinese and translated it into English. Technically, the solution is correct, but if you want the Latin characters as your "main" slug, it might be worth considering changing your default language to use English and keeping Chinese as a translation. This way, a slug such as "about-us" will be turned into /zh-hans/about-us.

Best Regards
Marcel

January 10, 2024 at 6:58 pm #15171083

jeremyL-10

This is a Chinese language website targeting the Chinese market, so web pages must show up in Chinese by default. We have to set Chinese as the default language to achieve this.

On the backend, we always create pages in English first and then translate it into Chinese. It works for the website and it works for us so far, with the exception of the page URLs.

With our workflow, how will WPML create the Chinese page URLs with the "Copy from original language if translation language uses encoded URLs" option turned on? Remember, the original language is English.

January 10, 2024 at 7:29 pm #15171270

Marcel
Supporter

Languages: English (English ) German (Deutsch )

Timezone: Europe/Madrid (GMT+02:00)

Hi,

On the backend, we always create pages in English first and then translate it into Chinese. It works for the website and it works for us so far, with the exception of the page URLs.

It was technically possible in translation management, as there is a language switcher, but it is possible to get issues with the page sync. Therefore, we did not recommend this workflow.

The 4.5.9 release published today allows the creation of jobs from a secondary language, but the permalink has no changes. If you select "copy", it will copy from your default language, Chinese.

Best Regards
Marcel

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.