Skip Navigation

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

Problem:
The client needs to translate donation forms from Italian to English using WPML, but only the title of the form is translatable through the WPML interface. The forms are built with a visual builder that is not yet compatible with WPML.

Solution:
We recommend using a custom code snippet to manually assign a language to the form. Here is the code you should use:

add_action( 'template_redirect', function() {<br />    include_once( WP_PLUGIN_DIR . '/sitepress-multilingual-cms/inc/wpml-api.php' );<br />    if( is_admin() ) {<br />        return false;<br />    }<br />    $post_id = 3792;<br />    $type = get_post_type( $post_id );<br />    $trid = wpml_get_content_trid( 'post_' . $type, $post_id );<br />    $language_code = 'es';<br />    $language_args = [<br />        'element_id' => $post_id,<br />        'element_type' => 'post_'.$type,<br />        'trid' => $trid,<br />        'language_code' => $language_code,<br />        'source_language_code' => null<br />    ];<br />    do_action( 'wpml_set_element_language_details', $language_args );<br />});

Additionally, it's important to note that the Stripe Payment Element language is determined by the browser's language settings, not the site's language. For more details on translating the donor dashboard, please check the WPML errata page: https://wpml.org/errata/give-donation-plugin-donar-dashboard-always-displays-on-default-language/

If this solution does not resolve your issue or seems outdated, we highly 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 https://wpml.org/forums/.

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 1 voice.

Last updated by Dražen 4 days, 3 hours ago.

Assisted by: Osama Mersal.

Author Posts
February 13, 2025 at 7:13 pm #16704228

Silvia Mancini

Background of the issue:
I have my site in Italian and I need to translate the two donation forms into English, which is my second language. I am using WPML translation tools.

Symptoms:
When I go into WPML>gestioni traduzioni and choose Form, I can only translate the title of the form.

Questions:
What am I supposed to do to have the same form in Italian and English?

February 13, 2025 at 9:52 pm #16704609

Mihai Apetrei
Supporter

Languages: English (English )

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

Hi there.

Before this ticket gets assigned to one of my colleagues, I will try to help.

Can you please take a look at this existing ticket:
https://wpml.org/forums/topic/feature-request-integration-with-givewp-forms/

I think this might help you understand how "translating" GiveWP donation forms works.

Please let us know if anything is still unclear or if you have further questions about this matter.

Mihai

February 13, 2025 at 10:26 pm #16704640

Silvia Mancini

Hi Mihai,
there is an Hidden Link and I couldn't figure out how to do it.
If you can assign it to one of your colleagues who can help me would be very happy.
Give has a documentation page that I link you here

hidden link

but alas I didn't understand I set up what they suggest but I couldn't configure it correctly (I also opened a new ticket with Give Wp at the same time)

Let me know thank you
silvia

February 14, 2025 at 7:03 pm #16707909

Silvia Mancini

Hey can you please reply?

February 16, 2025 at 9:52 am #16710301

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi Silvia,

I'm Osama from WPML forums support. I'll be glad to help you today.

First of all, sorry for the late reply; it was due to a higher workload.

1) Please log in to this hidden link">sandbox site and install GiveWP. Then, create a test donation form to replicate the issue.

If the issue is reproducible, please let me know so I can investigate and consult our compatibility team if necessary.

2) Could you please share your Debug information with me?
You can read a detailed explanation about it here. (http://wpml.org/faq/provide-debug-information-faster-support)
The debug info will give me much information about how your site is configured.

Best regards,
Osama

February 16, 2025 at 1:00 pm #16710706

Silvia Mancini

Hi Osama,
I've been going crazy since yesterday about this translation,
if you go here and scroll down the module has been partly translated into English (within the module itself hidden link) and partly instead it still has strings in Italian that I cannot in any way translate I have tried everything, the strings the .po files everything but to no avail.
If you click on the DONATE NOW button here:

hidden link

it opens the correct form (translated for good and I don't know how come being the same one you find in the above page) only the payment information is doubled????

Can I share with you the login to get into my amdin, while i configure give wp on the test site
Please help me!
THank you

February 16, 2025 at 1:06 pm #16710715

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Thanks for your update. Sure, I would need to request temporary access (WP-Admin and FTP)
Preferably to a test site where the problem has been replicated.

Your answer will be private, meaning only you and I can access it.

❌ Please backup your database and website ❌

✙ I need your permission to deactivate and reactivate the plugins and themes and change site configurations. This is also why the backup is critical.

✙ I also need your permission to take a local copy of your site to debug the issue without affecting your live site.

Best regards,
Osama

February 16, 2025 at 2:17 pm #16710800

Silvia Mancini

Also this button here at the end of this page
hidden link

DONA ORA instead of DONATE NOW i don't know how to translate.
GRAZIE MILLE
Silvia

donaora.jpg
February 16, 2025 at 3:45 pm #16710947

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi Silvia,

1) Thanks for the access details. I was able to fix the "hidden link">DONA ORA" button issue by editing the hidden link">English form and translating the button.

2) I couldn't fix the issue on the hidden link">Donations page form. Please replicate this issue on the sandbox site and let me know to consult our compatibility team.

Best regards,
Osama

February 16, 2025 at 4:14 pm #16710967

Silvia Mancini

HI OSAMA,
thanks for the button, ok i will ri-create the form and also the pop up that opens if you click on the DONATE NOW button did you understand why there is the:
1 - Accetti condizioni in italian (and not in english...no one string available to translate it)
2- Donation summury duplicate twice (see attached)

It's not clear why some parts are well translate and some other not!
Thanks you so much Osama for now.

I will send an other message when i replicate the issue on the sandbox site.

Best,
Silvia

PS: hope to find soon the solution as my client is not so happy for that.

donation.png
February 16, 2025 at 4:43 pm #16711062

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi Silvia,

I can see the Donation Summary section correctly while logged in or out. (Kindly check the attached screenshot)

Best regards,
Osama

2025-02-16_18-41-20.png
February 16, 2025 at 6:08 pm #16711158

Silvia Mancini

Yes Osama you're right! it's working

THANKS! a need to figure it out why the string "accetti le condizioni" is stil in italian?
do you have any ideas? Ans also the if you click on SHOW TERMS the lines are in italian too!!!!
where I have to go to traduce that part?

grazie

Silvia

Screenshot 2025-02-16 alle 19.08.17.png
February 16, 2025 at 11:30 pm #16711412

Silvia Mancini

Hi Osama,
I have solved the terms, and now these are translated.

I still have to understood why if i click in the home page and click on the fisrt up button DONATE NOW it works EVEN IF the button in DONA ORA and not DONATE NOW (1-.jpg)
also if you scrool down and click on the other DONATE NOW BUTTON the pop up that open has a duplication (2-.jpg)
at the end the donation form more or less is ok but see the final attached (3-.jpg).

hidden link
the button is wrong (what have you done to change it...it was in on other page)

Thank you for now,
in the form there always some untranslated words...

i haven't have yet the time to move the module on the site you gave me.
if we solve this issue maybe is not necessary because this operation needs time by my side.

let me know.
Tnx
Best,
silvia

3-.jpg
2-.jpg
1-.jpg
February 17, 2025 at 9:52 am #16712565

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi Silvia,

Please check if the buttons and the payment methods are translated correctly.

Best regards,
Osama

February 17, 2025 at 9:59 am #16712626

Silvia Mancini

Hi Osama,
now the buttons are ok, but why the "That's how much you're about to donate:
" io repeted twice?

Thank you
Silvia

2-.jpg