This thread is resolved. Here is a description of the problem and solution.
Problem:
You are updating text and links in the WPML string translation page on your website, but while the text updates correctly across different languages, the links do not. Specifically, the French link still appears on the English and Thai pages.
Solution:
We identified that the issue was due to the top bar section coming from Elements custom post type using custom Gutenberg elements, which were not fully compatible with WPML Translation Editor. Here are the steps we took to resolve this:
1. We added the following XML configuration in WPML >> Settings > Custom XML Configuration section:
<wpml-config> <gutenberg-blocks> <gutenberg-block type="generateblocks/container" translate="1" label="Container link"> <key name="url"></key> </gutenberg-block> <gutenberg-block type="generateblocks/headline" translate="1" label="Headline link translation"> <xpath>//span[@class="gb-headline-text"]/a</xpath> <xpath type="link">//a/@href</xpath> </gutenberg-block> </gutenberg-blocks> </wpml-config>
2. We opened the Topbar post in Edit mode in the default language and made a minor change (added a space in post title) to reload the translation.
3. We then opened the secondary language posts in Advanced Translation Editor and added the link translation.
For more details, you can refer to these documents:
- How to translate URLs, shortcodes, and HTML attributes using the Advanced Translation Editor
- Make custom Gutenberg blocks translatable
If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, we highly recommend checking related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket.
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.