Hey guys,
I’ve created two widgets with Enfold’s Mailchimp form. I’ve been able to translate the title and the button’s label. But I can’t figure out how to translate the text placeholder.
Text placeholder label in form
Enfold’s Mailchimp panel
Hey Phet,
Have you looked into the following?
Best regards,
Jordan Shannon
Hey Jordan,
Are you referring to WPML’s support? Yes I did create a support ticket with them. I’m still waiting for them to reply to my last message.
I wanted to know if you guys had any ideas…
Hi,
Sorry for the delay. You should be able to use the avf_sc_mailchimp_form_elements filter to adjust the value of the form fields and make them translatable. Example usage can be found here:
Just replace the avf_sc_contact_form_elements with the avf_sc_mailchimp_form_elements filter.
This is an example of the values contained in a single form field.
array (
'label' => 'Name',
'type' => 'text',
'check' => 'is_empty',
'options' => '',
'multi_select' => '',
'av_contact_preselect' => '',
'width' => '',
'av_uid' => 'av-9fiu',
),
Within the filter, you have to replace the default value of the label key and make it translatable using the translation __() function.
$formfield['label'] = __( $formfield['label'], 'avia_framework' );
// https://developer.wordpress.org/reference/functions/__/
You may need to loop through the $formfields first.
Best regards,
Ismael