Languages: English (English )Portuguese (Brazil) (Português )
Timezone: America/Sao_Paulo (GMT-03:00)
Hi Cindy
Thanks for your patience.
Here's our final thoughts:
As stated previously, there is no native way to not break the links if you need to change the language of site. But you can correct the links after the change, by placing a redirect with redirect plugin, or using regex DB search and replace to replace the URL on whole database.
You can do the search replace in the following way, for example:
We have URLs like
EN = hidden link
FR = hidden link
- First, replace FR URLs with placeholders to avoid replacement in the next step. e.g. from hidden link to my-french-domain-placeholder.
- Replace all EN URLs from hidden link to hidden link
- Now replace the placeholder string with the actual French URL from my-french-domain-placeholder to hidden link
Please make sure you have a complete backup, and at this point, I'm afraid that we can't take responsibility of any data loss.
Note: the possible solution provided is to be used just as an informational one. Please remember that custom coding is out of the scope of our support, so we can't create, debug or modify code for you and it's your responsibility to maintain it. We hope the one we used as an example could point you in the right direction. Please check our support policy: https://toolset.com/toolset-support-policy/ - https://wpml.org/purchase/support-policy/
Thanks for your understanding. If you need anything else don't hesitate to contact us.