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?
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.