Skip Navigation

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

Problem:
If you're experiencing issues with translating text within Gutenberg blocks from Rehub theme like titlebox, review box you need to add custom XML configuration for them.
Solution:
We recommend adding specific XML configuration to your WPML settings. Here's a step-by-step guide:
1. Navigate to WPML > Settings > XML Configuration.
2. Add the following XML code:

<wpml-config>
  <gutenberg-blocks>
    <gutenberg-block type="rehub/conspros" translate="1">
      <key name="prosTitle"></key>
      <key name="positives">
        </key><key name="0">
          <key name="title"></key>
        </key>
      
      <key name="consTitle"></key>
      <key name="negatives">
        </key><key name="0">
          <key name="title"></key>
        </key>
      
    </gutenberg-block>
    <gutenberg-block type="greenshift-blocks/titlebox" translate="1">
      <key name="id"></key>
      <key name="title"></key>
    </gutenberg-block>
    <gutenberg-block type="core/paragraph" translate="1"></gutenberg-block>
    <gutenberg-block type="rehub/titlebox" translate="1">
      <key name="title"></key>
      <key name="text"></key>
    </gutenberg-block>
    <gutenberg-block type="rehub/reviewbox" translate="1">
      <key name="title"></key>
      <key name="description"></key>
      <key name="postId"></key>
    </gutenberg-block>
  </gutenberg-blocks>
</wpml-config>

3. After adding the code, make a small change to the default language and re-translate the content.
Additionally, you may want to inform the theme author about this issue so they can include a fix in their theme updates.

If this solution doesn't seem relevant to your issue, please don't hesitate to open a new support ticket with us.

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 9 replies, has 2 voices.

Last updated by davidW-119 1 year, 3 months ago.

Assisted by: Dražen.

Author Posts
December 14, 2023 at 1:58 pm #15064063

davidW-119

When i translate my page, any text in blocks doesn't get translated. I have tried all settings that I can find and added strings but nothing I seem to do works. Any advice?

hidden link

December 15, 2023 at 9:25 am #15070661

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

1) In order to expedite handling your support requests, can you please share WPML support debug information from your site.

- To give debug information, login to your site and go to WPML → Support. From there click on the “debug information” link at the bottom of the page.
- Once on the “debug information” page, select the entire content of the text box and copy it.
- Now go back to our support forum, find debug information box and paste it.

More information on the link: https://wpml.org/faq/provide-debug-information-faster-support/

2) Can you please make sure you are translating Blocks via WPML editor and not via String translation plugin.

Please check next docs:

- https://wpml.org/documentation/getting-started-guide/translating-content-created-using-gutenberg-editor/

Let me know how it goes, also I have not been able to visit your website to see the issue, it is down for me.

Regards,
Drazen

December 15, 2023 at 3:38 pm #15074193

davidW-119

Hi Thanks for getting back to me. Sorry my site had redirect issues today but you should be able to see it again. I went through the information you sent me once again but the text I have in the boxes doesn't appear on the translation page at all (as in video). It's as if WPML can't see it. I wasn't sure if there is something I haven't enabled in settings or not. I Anyway, I have debugged, where should I paste it?
Thanks

December 18, 2023 at 7:55 am #15080817

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

1) As for WPML debug info please add them to debug box, as described in our docs:

- https://wpml.org/faq/provide-debug-information-faster-support/

2) I see you are using and mixing some page builder, can you please confirm are you suing Elementor or Gutenberg for this page and your website?

Thanks,
Drazen

December 18, 2023 at 2:23 pm #15085067

davidW-119

For that page I have been using gutenberg blocks only. The home page (I think) is the only one currently edited using elementor, although other pages from the theme might be using elementor too. I haven't explored the whole theme yet though.

For the debug section, not sure if I am missing something, but I don't see the box available in this chat ( see photo )

Thanks

debug missing.png
December 19, 2023 at 7:12 am #15088867

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks for getting back.

Okay, let me check and see what is happening on that example page.

Please make a full backup of your site (files and database) and confirm it in your next reply.
If possible please provide access to the staging website, not production.

Please note, that I might need to do some debugging procedures like enable/disable plugins, switch themes, change the default language of the user account, and/or access your website database to debug the issue furtherly.

I will share with you any changes or steps done in this process. Please let me know if you do not agree with the above or if I do not have your permission for any.

I would need to access both your site's wp-admin and FTP account, if possible.

I have enabled the private username and password fields in your next reply.

I suggest you create a new user, set it as an administrator and then add those credentials in the private fields mentioned.

You can safely add your information into these fields.

Regards,
Drazen

December 22, 2023 at 8:12 am #15114623

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks for getting back.

I checked and I see text is added via blocks coming from there ReHub. Seems the author forgot to add XML code for WPML, so text in these blocks is translatable via WPML, for example for rehub/color-heading.

What I suggest is next, I create a test site, please go there install the Rehub theme, and create a new test page. On that page add all the ReHub blocks that are not translated in your website, as much you can add that is great.

Then I will check and escalate to our compatibility team, and we will try to provide XML code for all blocks so you can translate them.

Link to test site: hidden link

Let me know.

Thanks,
Drazen

December 26, 2023 at 3:42 am #15128021

davidW-119

Hi thanks for all your help. Hope you had a good Xmas. I have added a new post with the blocks that didn't translate. I am not sure if there are more but so far this is all I have used. The sidebar also didn't translate but it isn't a block as far as I can see (see photo).

hidden link

Should I also report this back to rehub if it is something they have left out?

All the best
David

Screenshot 2023-12-26 103941.png
December 27, 2023 at 7:30 am #15131180

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello David,

thanks, hope you also had a nice holiday.

I have checked and added the next XML code to WPML > Settings > XML Configuration. I made a small change to the default language and re-translate, it works fine now.

Sure, you can also contact the theme author and update on this, so they can add it theme and update on rest of the widgets if needed.

Code:

<wpml-config>
  <gutenberg-blocks>
    <gutenberg-block type="rehub/conspros" translate="1">
      <key name="prosTitle"/>
      <key name="positives">
        <key name="0">
          <key name="title"/>
        </key>
      </key>
      <key name="consTitle"/>
      <key name="negatives">
        <key name="0">
          <key name="title"/>
        </key>
      </key>
    </gutenberg-block>
    <gutenberg-block type="greenshift-blocks/titlebox" translate="1">
      <key name="id"/>
      <key name="title"/>
    </gutenberg-block>
    <gutenberg-block type="core/paragraph" translate="1"/>
    <gutenberg-block type="rehub/titlebox" translate="1">
      <key name="title"/>
      <key name="text"/>
    </gutenberg-block>
    <gutenberg-block type="rehub/reviewbox" translate="1">
      <key name="title"/>
      <key name="description"/>
      <key name="postId"/>
    </gutenberg-block>
  </gutenberg-blocks>
</wpml-config>

Regards,
Drazen

December 28, 2023 at 1:54 pm #15134979

davidW-119

Amazing! Thanks so much for taking the time to help.

All the best

David