Skip Navigation

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

Problem:
The client is unable to see the full text for translation in WPML, coming from Spectra blocks, and the translated text does not appear on the frontend for their product descriptions.

Solution:
1) We added necessary XML configurations for Gutenberg blocks in WPML -> Settings -> Custom XML Configuration to make them translatable. Here is the XML needed for some of the blocks:

<wpml-config>
  <gutenberg-blocks>
    <gutenberg-block type="uagb/tabs" translate="1">
      <key name="tabHeaders"></key>
      <xpath>//div/ul/li/a/div</xpath>
    </gutenberg-block>
    <gutenberg-block type="uagb/tabs-child" translate="1">
      <key name="header"></key>
      <key name="tabHeaders"></key>
    </gutenberg-block>
    <gutenberg-block type="uagb/faq-child" translate="1">
      <key name="question"></key>
      <key name="answer"></key>
    </gutenberg-block>
    <gutenberg-block type="uagb/advanced-heading" translate="1">
      <xpath>//div/p</xpath>
      <xpath>//div/h3</xpath>
      <xpath>//div/h4</xpath>
    </gutenberg-block>
  </gutenberg-blocks>
</wpml-config>

2) We translated several related "Patterns" and "Content Blocks" via WPML -> Translation Management. After assigning the translation tasks, we completed them from the "Translation queue".
3) For any untranslated blocks, such as product tabs, additional XML paths were added, and a minor change in the original content was made to update the translations.

If this solution does not resolve your issue, or if it seems outdated, 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 the problem persists, 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.

Tagged: 

This topic contains 0 replies, has 0 voices.

Last updated by davidB-295 7 hours, 22 minutes ago.

Assisted by: Waqas Bin Hasan.

Author Posts
March 14, 2025 at 9:45 am

davidB-295

Background of the issue:
I am trying to translate my products' description using WPML. The issue can be seen on these pages: hidden link vs hidden link.
There is a demo: hidden link

Symptoms:
The full text doesn't appear for translation, and the text I translated doesn't show up on the frontend. Only some text is available for translation.

Questions:
Why is the full text not appearing for translation?
Why doesn't the translated text show up on the frontend?

March 14, 2025 at 10:44 am
March 14, 2025 at 10:46 am #16815964

Waqas Bin Hasan
Supporter

Languages: English (English )

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

Hi,

Reference to our recent chat, I've enabled your next reply as private to provide the access to the staging site for further investigation.

See https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/ for details on privacy and security.

P.S.: If you don't see the section for providing access information, do not write in the message box or the information may appear as public.

Regards.

March 14, 2025 at 1:50 pm
March 17, 2025 at 5:06 am #16822863

Waqas Bin Hasan
Supporter

Languages: English (English )

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

Thank you for the access, I am working on this and 'll get back to you as soon as I find something or have a solution.

March 17, 2025 at 7:01 am #16823026

Waqas Bin Hasan
Supporter

Languages: English (English )

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

Thank you for your patience and cooperation. I was able to find and fix the problem. Let me explain in steps below:

1) A few blocks were needed to be recognized by WPML, so these can be then available for translation in translation editor. So I added following in WPML -> Settings -> Custom XML Configuration for these blocks:

<wpml-config>
  <gutenberg-blocks>
    <gutenberg-block type="uagb/tabs" translate="1">
      <key name="tabHeaders" />
    </gutenberg-block>
    <gutenberg-block type="uagb/faq-child" translate="1">
      <key name="question" />
      <key name="answer" />
    </gutenberg-block>
    <gutenberg-block type="uagb/advanced-heading" translate="1">
      <xpath>//div/p</xpath>
    </gutenberg-block>
  </gutenberg-blocks>
</wpml-config>

The first 2 blocks, I believe are optional, but I added these for the sake of compatibility and to ensure that there content is available for translation. While the last block "uagb/advanced-heading" needs this config.

After that, I opened the relevant product (or pattern, like where it used), made a few changes in the text (i.e. a word or dot), saved and updated the translation. This needs to be done for once, however, if you see that same block used elsewhere isn't working, just repeat these steps (i.e. edit, save and update translation).

2) Several related "Patterns" and "Content Blocks" haven't been translated. So I translated these via WPML -> Translation Management -> Selected the intended "Pattern" and "Content Block" and assigned myself for translation (i.e. Translate Myself option) for Czech.

Then from "Translation queue", I translated these - see attached image.

As you can see that the "Dentapreg UFM" product is using several patterns and content blocks, these all need to be translated from Translation Management. You can repeat the same process for other languages, products and related patterns/content blocks.

Screenshot 2025-03-17 115046.jpg
Screenshot 2025-03-17 114953.jpg
March 18, 2025 at 8:28 am #16828431

davidB-295

Hi, thanks so much for the fix! I tried translating the CUBE product, and it's finally showing up (though I tried it on my production site). However, there are still two issues:

1. The headers don't show up in the editor and remain in English on the frontend. I tried editing the header and translating it again, but it didn’t help.
2. The product tab names aren't translating (even in your image). But I can see them in translation editor translated.

Could you please help me with that?

March 18, 2025 at 1:31 pm #16830624

Waqas Bin Hasan
Supporter

Languages: English (English )

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

Thank you for the updates.

Product Tab Names: Yes you are right these are not being displayed as translated, although with previous XML config, these can be translated in the translation editor. However, looks like the problem is coming from Blocksy Companion (Premium) plugin. This plugin had the same problem in the past, which their team fixed after coordination with our team. But one workaround looks missing from the plugin. However, I tried that also without any luck.

So I'm working more on it, right now I've deactivated Spectra plugin as well and the tab titles can be seen untranslated. That's why my suspect is around the said plugin.

I'll try to reproduce the issue in a fresh site and 'll check with my team accordingly. This can take some time but I'll keep you posted about the progress.

The headers: If you're referring to site header, then it is a separate issue. I recommend opening a separate ticket/chat because as per forum policy we can only handle one issue per ticket/chat. So you can get more to the point help, without mixing up several issues in one long ticket.

March 19, 2025 at 9:51 am #16834217

Waqas Bin Hasan
Supporter

Languages: English (English )

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

Thank you for your patience and cooperation.

Correction: I was wrong about the block coming from Blocksy plugin, but you're right about Spectra.

I've reproduced the issue from scratch with only Spectra plugin in a fresh sandbox site and have escalated the issue to our compatibility team for further investigation.

I'll update you as soon as there's more to it.

March 19, 2025 at 12:17 pm #16835096

davidB-295

Hi, thank you for the updates.
Regarding the headers - sorry, I meant the headings inside the product descriptions. For example in Fibrafill Cube: “ WHY DO RESTORATIONS FAIL?”

March 20, 2025 at 5:47 am #16837979

Waqas Bin Hasan
Supporter

Languages: English (English )

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

Thank you for your patience and cooperation.

For the product tabs not showing as translated into other language, our team suggested to add the following XML to "uagb/tabs":

<xpath>//div/ul/li/a/div</xpath>

So the full XML config 'll be like:

<wpml-config>
  <gutenberg-blocks>
    <gutenberg-block type="uagb/tabs" translate="1">
      <key name="tabHeaders" />
      <xpath>//div/ul/li/a/div</xpath>
    </gutenberg-block>
    <gutenberg-block type="uagb/tabs-child" translate="1">
      <key name="header" />
      <key name="tabHeaders" />
    </gutenberg-block>
    <gutenberg-block type="uagb/faq-child" translate="1">
      <key name="question" />
      <key name="answer" />
    </gutenberg-block>
    <gutenberg-block type="uagb/advanced-heading" translate="1">
      <xpath>//div/p</xpath>
    </gutenberg-block>
  </gutenberg-blocks>
</wpml-config>

And after that just make a little change to the content in original language, save and update translation. It is now displayed as translated on the frontend too (see attached).

For the "heading" inside product description (i.e. Fibrafill Cube), I see these translated on Czech, while for German, the product looks like "duplicated" and hasn't been translated (see attached). Please also watch my hidden link">screen recording.

Just like Dentapreg product which is using several patterns, content blocks and blocks, there are related to Fibrafill as well which need translation.

I'll also recommend checking this guide https://wpml.org/documentation/support/language-configuration-files/make-custom-gutenberg-blocks-translatable/, which you can use to incorporate other blocks which are not available in translation editor or not being displayed as translated (provided that these has been translated).

Screenshot 2025-03-20 103704.jpg
Screenshot 2025-03-20 103523.jpg
March 20, 2025 at 11:42 am #16839800

davidB-295

Hi, the tabs are finally correctly translated! Thank you for that.

However, I’m still unable to translate the headings on my dev site (beta.adm.dental). I must have missed something. Here you can see the problem:

hidden link

March 20, 2025 at 2:03 pm #16840408

Waqas Bin Hasan
Supporter

Languages: English (English )

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

Sure, I'll check it again soon. Probably there are some blocks in that pattern which still need to be recognized.

March 21, 2025 at 5:58 am #16842512

Waqas Bin Hasan
Supporter

Languages: English (English )

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

Thank you for your patience and cooperation.

It should be OK now, I've added following new paths to uagb/advanced-heading block:

<xpath>//div/h3</xpath>
<xpath>//div/h4</xpath>

I've made the change in test and beta sites and have updated the translation of the pattern as well.

Please also hidden link">watch this screen recording, which I've made to explain above the above mentioned and how you can fix such things in the future. I've also shared the relevant guide in my previous messages.

March 21, 2025 at 11:03 am #16843867

davidB-295

Hi, thanks! Now it seems to work.
Thank you for the screen recording, I will look at it.