Skip Navigation

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

Problem:
You are trying to translate the Spectra plugin table of contents block on your site using WPML, but the block does not translate.
Solution:
We recommend adding the following code to WPML > Settings > Custom XML Configuration:

<wpml-config><gutenberg-blocks><gutenberg-block type="uagb/table-of-contents" translate="1"><key name="headingTitle"></key></gutenberg-block></gutenberg-blocks></wpml-config>

After adding the code, make a small modification and save the changes. 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 the problem persists, 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.

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Itamar 3 months ago.

Assisted by: Itamar.

Author Posts
July 2, 2024 at 2:25 pm #15876286

svenjaK-2

Background of the issue:
I am trying to translate the spectra plugin table of contents block on my site hidden link using WPML.

Symptoms:
The table of contents block does not translate.

Questions:
How can I translate the spectra table of contents block using WPML?

July 2, 2024 at 3:48 pm #15876767

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

As discussed, we need to replicate this issue on a fresh WordPress installation. Then, I'll provide you with the needed code or escalate it to our compatibility team. For this, I created a test website with a clean WordPress install. You can access it through this link:

hidden link

With this link, you'll be directly logged in.

Could you please install the Spectra plugin and see if the issue is replicable on a clean WordPress installation?

Please configure WPML as set on your site (just the basic configurations needed to replicate the issue are enough) and ensure you install the latest version of the plugin.
Please let us know when everything is finished, and you can replicate the problem.

Important! Do not import your site to the test site. We must replicate the problem on a fresh, clean WordPress installation.

Regards,
Itamar.

July 3, 2024 at 11:01 am #15883422

svenjaK-2

I recreated the problem in the sandbox - please have a look. I created the page in german, then translated it to english. I have not found the possibility to translate the term "Überschrift/table of content" in the strings. As you can see, in the table of contents on the english page it is not translated.

Bildschirmfoto 2024-07-03 um 13.01.20.png
July 4, 2024 at 3:05 pm #15893017

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

Thanks for replicating the issue on the sandbox site.

- Add the following code to WPML > Settings > Custom XML Configuration:

<wpml-config>
  <gutenberg-blocks>
    <gutenberg-block type="uagb/table-of-contents" translate="1">
      <key name="headingTitle" />
    </gutenberg-block>
  </gutenberg-blocks>
</wpml-config>

- Do a small modification and save
- Update the translation

Regards,
Itamar.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.