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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -

Supporter timezone: Asia/Singapore (GMT+08:00)

This topic contains 15 replies, has 2 voices.

Last updated by Kor 1 year, 7 months ago.

Assisted by: Kor.

Author Posts
April 10, 2023 at 6:31 pm

usahello

Good afternoon. I've been reading WPML support tickets relating to the translation of anchor links for Gutenberg blocks. From what I gather, it is not possible to translated an anchor link that is assigned to a block and the only "solution" is to manually translate the page and edit the anchor links on a per-block basis (as noted here: https://wpml.org/forums/topic/translate-ids-html-anchor-of-gutenberg-blocks/). However, this is a terrible workaround and either requires us to always translate that page manually OR switch back to ATE make updates then go back to editing manually and re-entering ALL of the anchor links that got reverted when the page was opened in ATE. Is this something that the WPML team is working on fixing. Having translated anchor links is an important feature.

April 10, 2023 at 7:19 pm
April 10, 2023 at 7:20 pm #13439771

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Hi there,

Thanks for your patience.

Here is the ticket and I will investigate this further and will come back to you as quickly as possible.

Thanks!

Kor

April 11, 2023 at 3:45 pm #13447959

usahello

Thank you, I'll wait to hear back.

April 12, 2023 at 6:26 pm #13458963

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Hi there,

Thanks for your patience.

I've escalated this to our 2nd Tier Support and I will come back to you once I've feedback.

Thanks!

Kor

April 12, 2023 at 7:41 pm #13459263

usahello

Thanks for the update.

April 13, 2023 at 10:21 am #13463217

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Hi there,

Thanks for your patience.

We used the wrong XML configuration. Please try the code below instead. I've tested it on our sandbox site and it worked.

<wpml-config>
  <gutenberg-blocks>
    <gutenberg-block type="core/table" translate="1" label="My fallback block label">
      <xpath>//figure/@id</xpath>
    </gutenberg-block>
  </gutenberg-blocks>
</wpml-config>

Thanks!

Kor

April 13, 2023 at 2:50 pm #13465963

usahello

Kor, I've been experimenting while I've waited to hear back and I already tried that <xpath> declaration, but it doesn't work. I just tried it again and still don't see the anchor link ID show up in ATE. Are you able to get it to work on your end on a different website?

April 13, 2023 at 3:08 pm #13466173

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Hi there,

Thanks for your reply.

Yes, it worked fine here hidden link on this page hidden link .

Did you make minor edits to the page title so that it refreshes the Advanced Translation Editor?

Thanks!

Kor

April 13, 2023 at 3:14 pm #13466219

usahello

Kor, yes I made a simple edit/update to the English source page, but did not see the anchor link show up in ATE. I do see that the anchor link on your test site works, but the actual content of the Table itself doesn't show up for translation, which is also something we've noticed on our website. I've been able to get one or the other to work, but not both simultaneously.

April 13, 2023 at 3:34 pm #13466397

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Hi there,

Thanks for your reply.

Please use this one and it should work.

<wpml-config>
  <gutenberg-blocks>
    <gutenberg-block type="core/table" translate="1" label="My fallback block label">
      <xpath>//figure/@id</xpath>
      <xpath>//figure</xpath>
    </gutenberg-block>
  </gutenberg-blocks>
</wpml-config>

Thanks!

kor

April 13, 2023 at 3:46 pm #13466451

usahello

Kor, that is very close to working, but it combines the cells of the Table into the same string in ATE. For example, on your test page the top row has two columns, the left one says "This entire table sentence is a link" and the right one says "here's an email@duck.com address link". They are separate strings, but in ATE they get combined into this "This entire table sentence is a link.here's an email@duck.com address link"

concatenated strings.jpg
April 13, 2023 at 3:53 pm #13466501

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Hi there,

Thanks for your reply.

When translating it, you'll see two TD's which is equivalent to two data cells. Check out the attached screenshot.

Thanks!

Kor

Screenshot_49.png
April 13, 2023 at 4:09 pm #13466689

usahello

Still seems weird that it would combine the cells that way. Why is that?

April 13, 2023 at 4:28 pm #13466765

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Hi there,

Thanks for your reply.

That's how the Advanced Translation Editor works with HTML content. It separates the table cells by < tr> and compiles them into segments.

There is no option to control that, unfortunately.

Thanks!

Kor

The topic ‘[Closed] Translating CSS ID from Gutenberg’ is closed to new replies.