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.

This topic contains 3 replies, has 2 voices.

Last updated by Bruno Kos 8 months, 2 weeks ago.

Assigned support staff: Bruno Kos.

Author Posts
February 5, 2019 at 12:05 pm #3161711

amyD-3

I am trying to: I had created some custom gutenberg blocks which are used across my site. I want to translate the content for these custom blocks

Link to a page where the issue can be seen: hidden link (EN, translated), hidden link (DE, original)

I expected to see: The content should have all been translated properly

Instead, I got: I exported all the pages in xliff for translation and got back the translated files. When I imported the files, all the pages were created but the blocks were invalidated

February 6, 2019 at 10:05 am #3164926

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

Thank you for contacting WPML support!

When you mention "some custom gutenberg blocks", are you referring to this?
https://wordpress.org/gutenberg/handbook/designers-developers/developers/tutorials/block-tutorial/writing-your-first-block-type/

In other words, you've programmatically created new gutenberg blocks that are not working with XLIFF files?

Regards,
Bruno Kos

February 6, 2019 at 10:25 am #3164989

amyD-3

Yes, I used create-guten-block to create custom blocks hidden link.
The content inside those blocks are properly translated in some pages whereas in most of the pages, the whole block is invalid

February 6, 2019 at 10:46 am #3165035

Bruno Kos
Supporter

Languages: English (English )

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

Hi,

Based on this:

"The content inside those blocks are properly translated in some pages whereas in most of the pages, the whole block is invalid"

Does it mean that your custom block randomly works, even if translations are imported via XLIFF? In which scenario is this happening - perhaps on a page where there are exclusively your custom Gutenberg blocks or if it oly works if there is a mix of custom and native Gutenberg blocks?

Also, can you tell me if you tried this:
https://wpml.org/documentation/support/language-configuration-files/#gutenberg-blocks

We have a documentation on how to register Gutenberg blocks for translations.

Regards,
Bruno Kos

The topic ‘[Closed] Gutenberg custom block translation invalidates all the blocks’ is closed to new replies.