Skip Navigation

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

Problem:
The client was unable to translate the text inside a contact form created with the Getwid plugin.

Solution:
We recommended registering the Getwid contact form blocks for translation by adding custom language configuration XML code. The client should navigate to WPML > Settings > Custom XML Configuration tab and add the following code:

<wpml-config>
  <gutenberg-blocks>
    <gutenberg-block type="getwid/contact-form" translate="1">
      <key name="text"></key>
    </gutenberg-block>
    <gutenberg-block type="getwid/field-name" translate="1">
      <key name="label"></key>
    </gutenberg-block>
    <gutenberg-block type="getwid/field-email" translate="1">
      <key name="label"></key>
    </gutenberg-block>
    <gutenberg-block type="getwid/field-textarea" translate="1">
      <key name="label"></key>
    </gutenberg-block>
  </gutenberg-blocks>
</wpml-config>

After adding the code, the client should update the page in Portuguese to ensure the field texts are translated. For more information, we provided a link to our documentation on making custom Gutenberg blocks translatable: https://wpml.org/documentation/support/language-configuration-files/make-custom-gutenberg-blocks-translatable/

If this solution doesn't look relevant, please open a new support ticket in our forum: https://wpml.org/forums/forum/english-support/

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 1 reply, has 2 voices.

Last updated by Long Nguyen 1 year, 2 months ago.

Assisted by: Long Nguyen.

Author Posts
January 24, 2024 at 1:42 am #15219372

joaoR-15

Hi,

Thank you very much. That one is solved.

I'm having the same problem as before: text inside the contact form (here: hidden link) is not getting translated and I can't find it (see image 2).

On the contact form translations should be:

Content:
Nome* -> Name*
E-mail* -> Email*
Mensagem -> Message

Button:
Enviar -> Send

Thanks a lot for your time!

January 24, 2024 at 1:49 am #15219373

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Here is the new ticket. Similar to the first ticket https://wpml.org/forums/topic/toggle-boxes-titles-dont-show-translated/
The contact form block is a block from the plugin Getwid and this block is not registered for translation. You can open the Code editor and check this.
I register fields in the block with the custom language code below. The code is added to WPML > Settings > Custom XML Configuration tab.

<wpml-config>
  <gutenberg-blocks>
    <gutenberg-block type="getwid/contact-form" translate="1">
      <key name="text"></key>
    </gutenberg-block>
    <gutenberg-block type="getwid/field-name" translate="1">
      <key name="label"></key>
    </gutenberg-block>
    <gutenberg-block type="getwid/field-email" translate="1">
      <key name="label"></key>
    </gutenberg-block>
    <gutenberg-block type="getwid/field-textarea" translate="1">
      <key name="label"></key>
    </gutenberg-block>
  </gutenberg-blocks>
</wpml-config>

Then update the page in Portuguese and the field texts are translated as well. Please read more about language configuration code in the documentation
https://wpml.org/documentation/support/language-configuration-files/make-custom-gutenberg-blocks-translatable/

Look forward to your reply.
Thanks

Talk to us | AngrA+ 2024-01-24 08-49-19.jpg
Edit Page “Fale connosco” ‹ AngrA+ — WordPress 2024-01-24 08-42-36.jpg