Skip Navigation

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

Problem:
The client was unable to find and translate a specific string in the header of their website using WPML.
Solution:
1. To make the custom Marquee Elementor element compatible with the WPML Translation Editor, we added the following XML configuration in WPML >> Settings > Custom XML Configuration section:

<wpml-config>
  <elementor-widgets>
    <widget name="marquee">
      <fields>
        <field>marquee_label</field>
        <field>marquee_content</field>
      </fields>
    </widget>
  </elementor-widgets>
</wpml-config>

After this, we made a small change in the default language header template and translated the header in the secondary language. This made the marquee element content available for translation.
2. For translating the 'Donation' text, we followed these steps:
- Navigated to WPML >> String Translation page.
- Clicked on the 'Translate texts in the admin screen' link at the bottom of the page.
- Searched for the string and enabled its translation.
- Assigned the correct source language and added the translation of that string.
- Cleared the cache to reflect the updated translation.
For further details, you can refer to the following documentation links:

If this solution does not resolve your issue or seems outdated, we 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 further assistance is needed, 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.

This topic contains 11 replies, has 2 voices.

Last updated by Noman 2 months, 3 weeks ago.

Assisted by: Noman.

Author Posts
August 27, 2024 at 2:26 pm #16110534

matijaG-2

Background of the issue:
I am trying to find and translate a string in the header of my site hidden link using WPML.

This is the string: MCF HRVATSKA Ogranak najveće obitelji na svijetu - MCF-a u Keniji

Symptoms:
Not able to find and translate string in header.

Questions:
How can I find and translate a string in the header using WPML?

August 27, 2024 at 3:13 pm #16110892

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting WPML Support. I’ve visited your site and it seems this text is added using the Elementor page builder. Could you please follow the below steps and see if this resolves the issue:

1. Please make sure you have translated the Elementor header template into secondary language by following the below doc: https://wpml.org/documentation/plugins-compatibility/elementor/#translating-elementor-templates

2. If you are using some custom Elementor marquee element then you can make that element WPML Translation Editor compatible by following this doc: https://wpml.org/documentation/support/language-configuration-files/how-to-register-page-builder-widgets-for-translation/

Or disable the WPML Translation Editor from that specific header template and translate it manually using the default WordPress Editor by following this doc:
https://wpml.org/documentation/translating-your-contents/using-different-translation-editors-for-different-pages/

3. If the issue persists, please add the debug report in the Debug Information box. I have also enabled debug info box for your next reply: https://wpml.org/faq/provide-debug-information-faster-support/ .

Please let me know the results,

Thank you

August 29, 2024 at 3:23 pm #16121012

matijaG-2

Hey,

1. I tried to translate string in header but no luck.

This is the string that I can not translate - MCF HRVATSKA Ogranak najveće obitelji na svijetu - MCF-a u Keniji

2. This is the second string that I am not able to translate - Odaberite već ponuđene iznose ili sami odredite iznos donacije

Can you please help?

Thanks a lot

2-1 string Large.jpeg
2 string Large.jpeg
1 string Large.jpeg
August 30, 2024 at 4:29 pm #16125872

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thanks for providing more details. Sure I would be happy to help. To take a closer look at this issue, please provide temporary access (WP-Admin and FTP Login info) to your site (preferably staging site), so that I can look into your setup and debug the issue.

I’ve enabled a private input box for your next reply.

=== Please backup your database and website ===

✙ I would additionally need your permission to deactivate and reactivate Plugins and the Theme and to change configurations on the site. This is also a reason the backup is really important.

I am Off Fridays & Saturdays (my weekend) so I will be able to work on this first thing on Sunday.

Thank you so much

September 1, 2024 at 6:03 am #16128379

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Sorry for the delay, I was off during the weekend (Friday-Saturday). Thanks for providing the login details. I’m debugging this issue on your site and will get back with an update soon.

Thank you for your cooperation

September 1, 2024 at 11:33 am #16128793

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

1. For making custom Marquee Elementor element WPML Translation Editor compatible, I’ve added the below XML:

<wpml-config>
  <elementor-widgets>
    <widget name="marquee">
      <fields>
        <field>marquee_label</field>
        <field>marquee_content</field>
      </fields>
    </widget>
  </elementor-widgets>
</wpml-config>

In WPML >> Settings > Custom XML Configuration section and made a small change in the default language header template and translated the header in secondary language and the marquee element content was available for translation as you can see in the attached screenshots.

2. For translating the Donation text, I’ve followed the below steps:
2.1. Went to WPML >> String Translation page.
2.2. Click on the Translate texts in the admin screen link at the bottom of the page.
2.3. Searched for the string.
2.4. Enabled it’s translation as you can see in the attached screenshot.
2.5. Went to WPML >> String Translation page, assigned the correct source language, and added the translation of that string.
2.6. Cleared the cache and it seems to show the correct translation as you can see in the attached screenshots.

You should be able to update the translation from here:
hidden link

Here are docs for more details:
https://wpml.org/documentation/getting-started-guide/string-translation/finding-strings-that-dont-appear-on-the-string-translation-page/
https://wpml.org/documentation/getting-started-guide/string-translation/how-to-change-the-source-language-of-strings/

Please let me know if this resolves the issue or if you need further assistance with this issue.

Thank you

marquee text.png
header string frontend.png
Enable translation.png
donation string frontend.png
update translation from here.png
September 1, 2024 at 11:55 am #16128910
matijaG-2

Hi Noman,

thank you for your help.

I can see the strings translated.

1. But now the button Donate is not working when you click it and pop up window is not visible? - Please see the srceenshoot in attach.

2. Can I manage the flags of the language to be visible just one flag? What I mean is that when the web is in croatian language you can see only english flag and opposite.

Is there an option for that? - Please see the srceenshoot in attach.

Thanks

New threads created by Noman and linked to this one are listed below:

https://wpml.org/forums/topic/how-to-display-only-one-flag-in-language-switcher/

mobile-version-flag-.jpg
donate-button-not-working.jpg
September 1, 2024 at 2:50 pm #16129140

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

1. I've checked the issue with the Donate button and noticed that the popup isn't working even in the site's default language. Could you please let me know if this issue started occurring after the recent translation changes?

If the problem appeared after my updates, could you please restore the backup? This will help me review how the popup was functioning previously and identify any conflicts.

2. For the language switcher issue, it’s a different issue and will be handled separately as per our support policy. I've created a new ticket for this at: https://wpml.org/forums/topic/how-to-display-only-one-flag-in-language-switcher/

Thank you for your cooperation

September 2, 2024 at 6:59 am #16130094
matijaG-2

Hi Noman,

I restored a backup and donate button is now working only on english version.

Please check why does it not work on Croatian version?

Thanks a lot

New threads created by Noman and linked to this one are listed below:

https://wpml.org/forums/topic/donate-button-not-working-in-default-language/

eng pop up works well Large.jpeg
September 2, 2024 at 10:42 am #16131062

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for restoring the backup. I see that the Donate button is now working on the English version, but the issue persists on the Croatian(default) language. Since the problem is still present even after the restoration, it appears to be a separate issue from the recent changes.

As per our support policy, we'll need to handle this as a new issue. So, I created a new ticket here: https://wpml.org/forums/topic/donate-button-not-working-in-default-language/.

We’ll debug the donate button issue in a new ticket and get back to you with an update soon.

Thank you for your understanding, and please let me know if you have any further questions!

September 3, 2024 at 2:09 pm #16136128

matijaG-2

Hey,

its about: #16121012

can you please translate string again?

1. I tried to translate string in header but no luck.

This is the string that I can not translate - MCF HRVATSKA Ogranak najveće obitelji na svijetu - MCF-a u Keniji

2. This is the second string that I am not able to translate - Odaberite već ponuđene iznose ili sami odredite iznos donacije

Can you please help?

Thanks a lot

September 3, 2024 at 4:37 pm #16136915

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

I've followed the same steps as I mentioned here:
https://wpml.org/forums/topic/not-able-to-find-and-translate-string-in-header/#post-16128793

And now the strings and popup are working correctly in both languages. Could you please check and confirm?

You should be able to update the second string from here: hidden link

Thank you for your cooperation