Skip to content Skip to sidebar

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

Problem:
The client is trying to translate the header of their website using WPML with the Kadence theme. Despite following the standard translation procedures, the translated pages still display the English header instead of the translated version.
Solution:
1. Translate the menu items:
- Navigate to WPML > Settings > Custom XML Configuration and add the following code to translate the menu item label:


<gutenberg-block type="kadence/navigation-link" translate="1">
  <key name="label"></key>
  <key name="url" type="link"></key>
</gutenberg-block>

- Go to Kadence > Navigations, edit the navigation, and update the translation navigation.
2. Translate the header:
- Go to Kadence > Header, edit the header, switch to the second language, and manually select the navigation.
3. Translate the customizer option:
- Navigate to WPML > String Translation, then to Translate texts in admin screens, search for the option name "blocks_header_id", and add it to String Translation.
- Return to WPML > String Translation and translate the header template ID.

We recommend testing these steps on the sandbox site provided. If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, please visit our known issues page, verify the version of the permanent fix, and ensure you have installed the latest versions of themes and plugins. If the problem persists, feel free to open a new support ticket on our support forum.

0% of people find this useful.

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 Long Nguyen 1 year, 5 months ago.

Assisted by: Long Nguyen.

Author Posts
November 4, 2024 at 7:02 am #16358836

karlv-6

Background of the issue:
I am trying to translate the header of my website hidden link using WPML. I followed the documentation for translating the header.

Symptoms:
The translated pages still show the English header instead of the translated version.

Questions:
Why is the translated header not displaying on the translated pages?

November 4, 2024 at 8:42 am #16359291

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English ) Vietnamese (Vietnamese )

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

Hi,

Here is the forum ticket. I found a way to translate the menu items in the Kadence Header block. Please follow steps below and let me know how it goes:

1. Translate the menu items:
- Go to WPML > Settings > Custom XML Configuration > Add the code below to translate the menu item label:

<gutenberg-block type="kadence/navigation-link" translate="1">
  <key name="label" />
  <key name="url" type="link" />
</gutenberg-block>

- Go to Kadence > Navigations > Edit the navigation > Click on Update > Update the translation navigation.

2. Translate the header: Go to Kadence > Header > Edit the header > Switch to second language and manually select the navigation. See the attached screenshot.

3. Translate the customizer option:
- Go to WPML > String Translation > Translate texts in admin screens > Search for the option name "blocks_header_id" > Add it to String Translation.
- Back to WPML > String Translation > Translate the header template ID.

Feel free to test this on the sandbox site that I shared. Thanks.

Sandbox – Just another WordPress site 2024-11-04 15-40-53.png
Edit Kadence Header “Header Francais” ‹ Sandbox — WordPress 2024-11-04 15-40-01.png
String Translation ‹ Sandbox — WordPress 2024-11-04 15-39-37.png
November 4, 2024 at 9:15 am #16359514

karlv-6

Thanks, my editor indicates something is wrong with the code.

Screenshot 2567-11-04 at 16.14.45.png
November 4, 2024 at 9:22 am #16359556

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English ) Vietnamese (Vietnamese )

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

Hi,

You should add the code inside the tag <gutenberg-blocks> </gutenberg-blocks> please check the attached screenshot

  <gutenberg-blocks>
    <gutenberg-block type="kadence/navigation-link" translate="1">
      <key name="label" />
      <key name="url" type="link" />
    </gutenberg-block>    
  </gutenberg-blocks>

and follow the documentation https://wpml.org/documentation/support/language-configuration-files/make-custom-gutenberg-blocks-translatable/

Thanks.

Settings ‹ Sandbox — WordPress 2024-11-04 16-20-49.png
November 4, 2024 at 10:23 am #16360141

karlv-6

Works, thank you so much!