Skip to content Skip to sidebar

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.

Sun Mon Tue Wed Thu Fri Sat
- 12:00 – 14:00 12:00 – 14:00 12:00 – 14:00 12:00 – 14:00 12:00 – 14:00 -
- 17:00 – 21:00 17:00 – 21:00 17:00 – 21:00 17:00 – 21:00 17:00 – 21:00 -

Supporter timezone: Europe/Vienna (GMT+02:00)

Tagged: 

This topic contains 1 replies, has 0 voices.

Last updated by Bigul 5 days, 4 hours ago.

Assisted by: Bigul.

Author Posts
July 14, 2025 at 4:04 pm

wouterS-4

Background of the issue:
I want to show my default language in the /en/ subdirectory on my site hidden link. This is already working for page loading, but internal links for the original language do not include the /en/ directory, which breaks the internal linking structure. I have not set anything under WPML / Languages / Language URL format.

Symptoms:
Internal links for the original language do not have the /en/ directory, breaking the internal linking structure.

Questions:
How can I add /en/ to all default language (internal) links?
If I then save my permalinks, will all links across the website be updated?
How can I sync all secondary/third language pages/posts/products/links/etc with these (updated) original ones?

July 14, 2025 at 5:21 pm
July 15, 2025 at 12:54 pm #17237776

Bigul
WPML Supporter since 01/2013

Languages: English (English )

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

Hello,

For your kind information, our team has confirmed that the easiest and most practical workaround in this case is to perform a search-and-replace of internal links using a plugin like https://wordpress.org/plugins/better-search-replace/

However, since these types of changes are usually done during the initial setup of the site (not after a large amount of content is already in place), it is very important to handle this carefully, with robust logic, to avoid any issues. Therefore, please take a full site backup (mandatory) before the changes.

An alternative workaround will be writing a custom PHP script that detects whether the content is in the default language (https://wpml.org/wpml-hook/wpml_current_language/) and then replaces the links accordingly. Thank you for your kind understanding.

--
Thanks!

Bigul