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, 10 hours ago.

Assisted by: Osama Mersal.

Author Posts
February 17, 2025 at 10:15 am #16713003

Osama Mersal
Supporter

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

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

Hi Silvia,

I'm not sure why this section is repeated. Please create a new test form, use it in this button, and check if it will work correctly.

Best regards,
Osama

February 17, 2025 at 10:18 am #16713009
Silvia Mancini

Also as you know my situation, tell me if I have to open a new ticket but the plugin Custom 404 Pro even if i have translate it following the rules, once I am in the english version site and find an error page it links the italian page see the attached (italian setting CUSTOM 404) then I move into teh ENG tab on rigth top and select the Page not found page like this (english setting CUSTOM 404), changing the page to the English language causes me to delete the Italian...and I have NONE setting (none),
can you help me or I have to open a new ticket?

Am I doing something wrong?

Thank you Osama.
Silvia

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

https://wpml.org/forums/topic/custom-404-pro-plugin-settings/

none.png
english setting CUSTOM 404.png
italian setting CUSTOM 404.png
February 17, 2025 at 10:34 am #16713231

Osama Mersal
Supporter

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

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

Hi Silvia,

We try to keep one issue per ticket in our forum. Continuing with one ticket per issue helps supporters focus on one issue at once and enables other users to find solutions to their questions faster.

Therefore, I've split the other issue and created a new ticket with this issue.

Best regards,
Osama

February 17, 2025 at 10:39 am #16713283

Silvia Mancini

Repling to

#16713003

I created a new form (classic) as I have in the site we are analyzing, unfortunately I can't insert inside the page the Give button that calls the popup (which I find among the element elements and I don't have in the gutember wordpress), so I think the repetition problem is given by more factors, Give/Elementor/WPML.
I also rewrote to GIVE creators who are in California, you are in egypt I am in Florence Italy...different times.
And I don't know how to replicate the problem on the sandbox site.

Silvia

February 17, 2025 at 11:03 am #16713438

Osama Mersal
Supporter

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

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

Hi Silvia,

Thanks for your update. Let's wait for the Give team's reply on the repetition of the summary section.

After that, we will see how we can move forward in fixing the form issues.

Best regards,
Osama

February 17, 2025 at 4:28 pm #16715626
Silvia Mancini

No news from California for now

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

https://wpml.org/forums/topic/menu-language-switcher-5/

February 17, 2025 at 4:33 pm #16715674

Osama Mersal
Supporter

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

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

Hi,

I've split the other issue and created a new ticket with this issue.

Best regards,

February 17, 2025 at 6:18 pm #16715985
Silvia Mancini

Hi Osama, I don't know if you are still working,
but the TEAM section is not well translated.
Can you open a new ticket please with you?

I have the theme Alone (and it's a wpml translation problem too)

So if i translate the page italian in english it takes the english version and doesn't swtich to italian.
see attached

Thank you

Also the menu of these Team pages is without the selector of the language!!!

New threads created by Dražen and linked to this one are listed below:

https://wpml.org/forums/topic/split-team-section-is-not-well-translated/

team.jpg
February 18, 2025 at 8:41 am #16717357

Silvia Mancini

PLEASE make this last message as private.
Thank you

February 18, 2025 at 10:23 am #16717981

Dražen
Supporter

Languages: English (English )

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

Hello Silvia,

Osama is off today so I will take care of this ticket.

1) I have opened a new ticket for you:

https://wpml.org/forums/topic/split-team-section-is-not-well-translated/

2) As for your last reply, I see GiveWP support helped you with the form and advised you to contact the theme author for a style issue.

I advise following suggestions from their support and getting back to them if any doubts, from our side I am not sure there is anything else we can do for you in this case, and if you have any other problems please open a new ticket.

Let us know if you still need anything from our side in this case.

Regards,
Drazen