This thread is resolved. Here is a description of the problem and solution.
Problem: The client is using Astra Theme and Spectra Blocks and is unable to translate a button on their website. Solution: We recommend adding the following code to WPML > Settings > Custom XML Configuration:
<wpml-config>
<gutenberg-blocks>
<gutenberg-block type="uagb/call-to-action" translate="1">
<xpath>//*[self::h1 or self::h2 or self::h3 or self::h4 or self::h5 or self::h6]</xpath>
<xpath>//p[@class="uagb-cta__desc"]</xpath>
<xpath>//*[@class="uagb-cta__buttons"]</xpath>
<xpath>//a[@class="uagb-cta__button-link-wrapper"]</xpath>
</gutenberg-block>
</gutenberg-blocks>
</wpml-config>
After adding the code, make a small modification and save, then update the translation.
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 at https://wpml.org/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 at WPML support forum.
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.
Background of the issue:
I use Astra Theme and Spectra Blocks on my site hidden link. I am trying to translate a button on the page hidden link in the last box with the text 'Vous cherchez plus d'informations...'. I was able to translate the text of the CTA, but I do not find the button to translate it.
I created a minimal installation of WordPress, WPML, and all necessary WPML add-ons.
You can access the WordPress dashboard using the link below:
- hidden link
Kindly follow the steps below:
- Set up WPML
- Install the necessary plugins.
- Try to replicate the issue.
- Share with me step by step guide on how can I check the issue
This will help us to report the probable issue to the compatibility team and solve the possible problem faster.
thanks for taking the time to recreate the issue. I am trying the same my self on a new test site, so I can escalate this issue to our company team, but it seems it is working.
I am not sure if I am missing some steps, I installed the Spectra plugin and added a Container block and inside CTA with the button, but the button text shows up for translation.
Can you please check on this new test site and if I am missing any steps? And / OR try to recreate on new page by adding blocks and share step by step guide with me.
I created a new page in my sandbox: page 3 and created a new container with a CTA but it does not appear in the translation.
I then added a new page to your sandbox and the same happens: I do not see it in the translation. What am I missing?
I make a new page, insert a paragraph, insert a container (spectra), with only one box inside, then insert the CTA (spectra), save and publish the page.
Then I go to WPML translations management, put the page into the queue, open it for translation- no button to translate.
Add the following code to WPML > Settings > Custom XML Configuration:
<wpml-config>
<gutenberg-blocks>
<gutenberg-block type="uagb/call-to-action" translate="1">
<xpath>//*[self::h1 or self::h2 or self::h3 or self::h4 or self::h5 or self::h6]</xpath>
<xpath>//p[@class="uagb-cta__desc"]</xpath>
<xpath>//*[@class="uagb-cta__buttons"]</xpath>
<xpath>//a[@class="uagb-cta__button-link-wrapper"]</xpath>
</gutenberg-block>
</gutenberg-blocks>
</wpml-config>
- Do a small modification and save
- Update the translation
in my table of content, I can translate the heading (content - Inhaltsverzeichnis) but it does not show on the page, it still has the german text.
Then it takes all of the content correctly, but not the cta that we just solved the problem. There the translated table of content takes the german phrase, not the english for the table of content - please see screenshot
if I understand correctly this is about a new widget, called a table of content. Since this could be a specific issue or another compatibility and we limit 1 issue per ticket to keep things clear and in order, please open a new chat/ticket and we will be glad to check and help further.