Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
If you're experiencing issues with certain elements not appearing translated on your German page, such as 'stratégie' not showing as 'Strategie', despite using the advanced translator.
Solution:
We recommend you try the following steps:
1. Add the following XML in WPML >> Settings > Custom XML Configuration section:

<wpml-config><gutenberg-blocks><gutenberg-block type="pb/accordion-item" translate="1"><xpath>//div/h2</xpath></gutenberg-block></gutenberg-blocks></wpml-config>

2. Make a small change in the default language page to reload the translation.
3. Open the translated page in WPML Advanced Translation Editor and press the Complete Translation button.
If the issue persists, try these additional steps:
1. Open the default language page in Edit mode.
2. Make a small change, such as adding a space or + sign in the accordion title where you are facing issues.
3. Save the page.
4. Remove the small change made in step 2.
5. Update the page again.
6. Try to translate the page again.
If you still encounter problems, especially with strings containing the ampersand (&) symbol, replace "&" with "and" in the default language accordion title and check if that resolves the issue. Alternatively, consider using a WPML-compatible blocks plugin from this list: WPML-compatible blocks plugins.

If these solutions do not resolve your issue or if they seem 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. Should you need further assistance, please do not hesitate to 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.

This topic contains 8 replies, has 0 voices.

Last updated by Noman 3 weeks, 5 days ago.

Assisted by: Noman.

Author Posts
May 23, 2025 at 12:46 pm #17066334

ninaR-3

Background of the issue:
I am trying to translate a page from French to German using the advanced translator. The issue can be seen on this page: hidden link

Symptoms:
Certain elements are not appearing translated on the German page. For example, 'stratégie' should appear as 'Strategie'.

Questions:
Why are certain elements not appearing translated on the German page?
How can I ensure all elements are translated correctly?

May 25, 2025 at 4:25 pm #17070267

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting WPML Support. Could you please try to follow the below procedure and see if this resolves the issue:

1. Add the below XML in WPML >> Settings > Custom XML Configuration section:

<wpml-config>
  <gutenberg-blocks>
    <gutenberg-block type="pb/accordion-item" translate="1">
      <xpath>//div/h2</xpath>
    </gutenberg-block>
  </gutenberg-blocks>
</wpml-config>

2. Make a small change in the default language page to reload the translation.

3. Open the translated page in WPML Advanced Translation Editor and press the Complete Translation button.

Kindly let me know the results,
Thank you

May 26, 2025 at 7:52 am #17071346

ninaR-3

Hi Noman, thanks for your reply. I followed your steps, the problem unfortunately persists: hidden link (see also screenshots attached)

Screenshot 2025-05-26 at 09.52.13.png
Screenshot 2025-05-26 at 09.51.24.png
Screenshot 2025-05-26 at 09.50.48.png
May 26, 2025 at 2:56 pm #17074174

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thanks for trying the above suggested steps. Could you please try to follow the below procedure and let me know how it goes:

1. Open the default language page in Edit mode.
2. Make a small change, for example, add a space or + sign in accordion title in which you are facing issues.
3. Save the page.
4. Now, please remove that small change that did in step #2.
5. Update the page again.
6. Now, please try to translate the page and see if this resolves the issue.

I tried the same steps on my test site and it works correctly for me:
hidden link

If the issue persists, please provide temporary access (WP-Admin and FTP Login info) to your site (preferably staging site), so that I can look into your setup and debug the issue.

Your next answer will be private, meaning only you and I can access it.

=== Please backup your database and website ===

✙ I would additionally need your permission to deactivate and reactivate Plugins and the Theme and to change configurations on the site. This is also a reason the backup is essential.

Thank you

May 27, 2025 at 8:16 am #17076288

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thanks for providing the login details. I’ve investigated the issue and found that the translation doesn't work when there’s an ampersand (&) in the string. I tested it with default WordPress blocks and it works fine, so the issue seems specific to the Accordion Blocks plugin.

As a workaround, please try replacing the "&" with "and" in the default language accordion title and check if that resolves the issue.

Alternatively, you can contact the Accordion Blocks plugin author to see if they have a fix for this, or consider using a WPML-compatible blocks plugin from this list: https://wpml.org/plugin-functionality/gutenberg-blocks/

Let me know if this helps or if you need any further assistance

Thank you for your cooperation

May 27, 2025 at 10:37 am #17077289

ninaR-3

Hi Noman

Thanks for your reply. I can see that the two elements you mentioned are fixed. However there are a couple more without any ampersand, e.g ou -> Wo / innovation -> Innovation. The accordeon plugin is a very lightweight plugin with a clean html structure, I don't understand how this can be a problem. And how certain strings are translated and others not.

Screenshot 2025-05-27 at 12.35.36.png
Screenshot 2025-05-27 at 12.35.31.png
Screenshot 2025-05-27 at 12.34.26.png
May 27, 2025 at 5:00 pm #17079996

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thanks for checking. I followed the steps below:

1. Added a space in the two strings and updated the translation.
2. Then removed the space and updated the translation again.

Now the other two strings are also showing the correct translation, as you can see in the attached screenshot.

It seems the issue only affects strings that contain the ampersand (&) symbol. While the Accordion Blocks plugin has clean HTML, special characters like this can sometimes interfere with how WPML detects and handles the content, especially in custom blocks.

For now, the best workaround is to replace "&" with "and" in the original content. Alternatively, you could reach out to the plugin author to see if they can improve compatibility with WPML.

Let me know how you'd like to proceed or if you need help with further testing.

Thank you for your cooperation

translated strings.jpg
May 28, 2025 at 7:41 am #17081547
ninaR-3

Hi Noman

I did the same and it didn't work for me. Anyway, thanks for getting it to work. However, one more problem I was facing when I was looking for how I can translate on a normal gutenberg heading block the html anchor attribute. This should be something I would expect WPML being able to do. What do you advice how to translate the anchor links with the advanced editor? For now I just translated it on the german page itself. But thats not the ideal solution how to work with the editor I imagine.

May 28, 2025 at 10:18 am #17082815

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Glad to hear it works correctly now.

For the “heading block html anchor attribute” translation problem, it’s a different issue and will be handled separately as per our support policy. I've created a new ticket for this at: https://wpml.org/forums/topic/how-i-can-translate-on-a-normal-gutenberg-heading-block-the-html-anchor-attribute/

If the Accordion Blocks title translation issue is solved, please mark this ticket as resolved and we will continue working on the above ticket for it.

Thank you for your cooperation