Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 13:00 9:00 – 13:00 9:00 – 13:00 8:00 – 12:00 8:00 – 12:00 -
- 14:00 – 17:00 14:00 – 18:00 14:00 – 18:00 13:00 – 17:00 13:00 – 17:00 -

Supporter timezone: Europe/Zagreb (GMT+01:00)

This topic contains 0 replies, has 0 voices.

Last updated by Bruno Kos 8 minutes ago.

Assisted by: Bruno Kos.

Author Posts
March 12, 2025 at 8:23 am #16805417

Mirosław Tarasiewicz

Background of the issue:
I am trying to use WPML automatic translation for a custom Gutenberg block called 'Blog - box' which has an ACF Group with fields like headline, txt, and link. I am using the expert translate mode and have set the 'headline' field to 'translate', but it does not appear in the Advanced Translation Editor. The 'link' field, also set to 'translate', does appear. I have tried changing the field to 'Copy once', updating the post with a title change, and clearing the cache, but it didn't work. Previously, using the classic WordPress editor for translations, I had no issues. Here are the screenshots: hidden link

Symptoms:
The 'headline' field set to 'translate' does not appear in the Advanced Translation Editor, while the 'link' field does.

Questions:
Why does the 'headline' field not appear in the Advanced Translation Editor despite being set to 'translate'?
What steps can I take to ensure all fields appear in the Advanced Translation Editor?

March 12, 2025 at 8:54 am #16805760

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

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

If you try adding this block to a new page and try translating it, does it show in the translation editor?

March 12, 2025 at 9:03 am #16805777

Mirosław Tarasiewicz

I created a new page, added the block and still only link show up.

22.png
11.png
March 12, 2025 at 10:41 am #16806380

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

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

Can you try this?

1. **Inspect the Block in WordPress Editor:**
- Add the block to a post.
- Switch to **Code Editor** (top-right options menu > "Code editor").
- Copy the block's raw HTML.

2. **Create the XML for WPML Translation:**
- Refer to the guide: https://wpml.org/documentation/support/language-configuration-files/make-custom-gutenberg-blocks-translatable/#registering-gutenberg.
- Register your block following the XML structure provided in the documentation.

Let me know how it goes!

March 13, 2025 at 12:29 pm #16811822

Mirosław Tarasiewicz

1.
<!-- wp:acf/blog-box {"name":"acf/blog-box","data":{"headline":"Zobacz więcej inspiracji na naszym Instagramie! ","_headline":"field_6315ae5eaea9f","headline_id":"","_headline_id":"field_64a6b2af920f0","txt":"test","_txt":"field_6315ae6caeaa0","link":{"title":"Instagram Mardom Decor","url":"hidden link","target":"_blank"},"_link":"field_6315ae79aeaa1","acf_block_options_id":"","_acf_block_options_id":"field_5fc5f10200985","acf_block_options_additionalClass":"","_acf_block_options_additionalClass":"field_5fc5f0bb00984","acf_block_options_margin_top":"0","_acf_block_options_margin_top":"field_5fc6139755ce7","acf_block_options_margin_bottom":"0","_acf_block_options_margin_bottom":"field_5fc613ed55ce8","acf_block_options_padding_header":"0","_acf_block_options_padding_header":"field_5fc61aba7bede"},"mode":"edit"} /-->

2. Blog box appears in our site a lot of times, so It would take too much time to register it everytime.

March 13, 2025 at 2:08 pm #16812324

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

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

What if you try this?

<wpml-config>
  <gutenberg-blocks>
    <gutenberg-block type="acf/blog-box" translate="1">
      <key name="data" encoding="json">
        <key name="headline" />
        <key name="link">
          <key name="title" />
        </key>
        <key name="txt" />
      </key>
    </gutenberg-block>
  </gutenberg-blocks>
</wpml-config>

Add it like this:
https://wpml.org/documentation/support/language-configuration-files/#setting-translation-options-for-third-party-themes-and-plugins

And after this open any original page where such box is used, update it (just resave it) and open in the translation editor.

Does it show?