Hi There,
You should be able to change the text by adding the following custom snippet to your website.
function vc_give_text_switcher( $translation, $text, $domain ) {
if ( 'give' === $domain && 'Make this an anonymous donation' === $text ) {
$translation = __( 'YOUR TEXT HERE1' );
}
// For the help text.
if ( 'give' === $domain && 'Would you like to prevent this donation from being displayed publicly?' === $text ) {
$translation = __( 'YOUR TEXT HERE2' );
}
return $translation;
}
add_filter( 'gettext', 'vc_give_text_switcher', 10, 3 );
If you need any help in adding a custom snippet to your website, you can check this detailed doc here for more help: https://givewp.com/documentation/resources/adding-custom-functions-to-your-wordpress-website/
Thanks
Hello
I tried for my website that is french with divi plugin but it does not work !!!
@webcreationbelgium Can you provide a link to your form so we can see the problem live?
Hello. I also tried your solution, but is doesn’t work for my Divi website (https://nieuw.kindweeskind.nl/doe-een-gift/) neither.
Update: I managed to translate the text by editing PO and MO files.
Hi all,
The above snippet has some typos which is why it wasn’t working as intended. Use this instead please:
function vc_give_text_switcher( $translation, $text, $domain ) {
if ( 'give' === $domain && 'Make this an anonymous donation.' === $text ) {
$translation = __( 'Translated text 1' );
}
// For the help text.
if ( 'give' === $domain && 'Would you like to prevent your name, image, and comment from being displayed publicly?' === $text ) {
$translation = __( 'Translated Text 2' );
}
return $translation;
}
add_filter( 'gettext', 'vc_give_text_switcher', 10, 3 );
Thanks!