Skip Navigation

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

Problem:
The client wants the page URL to include special characters, similar to how it was displayed when using Weglot, but is now using WPML and the URLs do not retain the special characters.

Solution:
We recommend the following steps to include special characters in the slugs:
1. Consider using custom code to allow accents in permalinks. You can refer to this discussion on WordPress Stack Exchange. However, we cannot guarantee compatibility with WPML.
2. Use a third-party plugin like Permalink Manager Pro, which allows special characters in permalinks. More information can be found here: Permalink Manager Pro Documentation.
3. Manually encode the slug using a service like URL Encoder. After encoding, paste the encoded slug in the Quick Edit post section in the admin area for the Portuguese language version of the post.
For more details on how WordPress handles slugs, you can refer to the WordPress Developer Documentation.

If this solution does not seem relevant to your issue, 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 3 replies, has 3 voices.

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

Assisted by: Long Nguyen.

Author Posts
January 4, 2024 at 2:27 pm #15151134

rafikH-2

I want the URL to show the page slug with special characters like this: hidden link

Now it shows the following:
/pt/grao-de-bico-e-fritas-de-abobora/

January 4, 2024 at 2:57 pm #15151920

Mohamed Sayed

As per our chat discussion, please provide your debug information once it's available so we can look at some of your configurations.

You can find it in WPML > Support > click on “Debug information” link. Please check this link for more info: http://wpml.org/faq/provide-debug-information-faster-support/

January 5, 2024 at 7:08 am #15153267

rafikH-2

Please check now.

January 5, 2024 at 9:00 am #15153582

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

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

Hi Rafik,

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

By default, WordPress itself will sanitize the slug and remove the accent. I'm not sure how Weglot processes that post slug but you can test on a clean installation of WordPress with Portuguese as the default language, no need to install WPML there.

If you want to have the accent words in the post slug, I suggest you follow some options below:
1. Use a custom code, following this topic https://wordpress.stackexchange.com/questions/50533/how-to-map-permalinks-with-accented-letters-to-sanitized-slugs
Note: I cannot guarantee that it works with WPML.

2. Use a third-party plugin Permalink Manager Pro
hidden link.

3.
- Visit this site hidden link
- Paste the accent slug "grão-de-bico-e-fritas-de-abóbora" and encode "gr%C3%A3o-de-bico-e-fritas-de-ab%C3%B3bora"
- In the admin area > Switch to Portuguese language > Click on Quick Edit post > Paste the encode slug there and save.

Refer WordPress documentation https://developer.wordpress.org/reference/functions/sanitize_title/

Look forward to your reply.
Thanks