Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #967292

    Hi there,

    how can I translate the error message “Error: You must agree to our privacy policy to comment on this site…” of privacy policy message in comment form that appears in a new window when not checked? Tried via Loco translate plugin, but there is no such error message.

    Thank you for your kind hep in advance.

    Best regards,
    Sophie

    #969703

    Hey Sophie,

    Thank you for using our theme.

    The text is located in enfold\includes\helper-privacy.php line 280.

    
    $error_message = apply_filters( 'avf_privacy_comment_checkbox_error_message', __( 'Error: You must agree to our privacy policy to comment on this site...' , 'avia_framework' ) );
    

    Actually it should be recognised by translation plugins.

    But you can also use the filter to change it.

    If you need assistance in using the filter let us know.

    Best regards,
    Günter

    #969714

    Hi Günter,

    thank you for your kind message. I am using Enfold child theme, how to solve with Enfold child and the above php file?

    Thank you for your help.

    Best regards,
    Sophie

    #969719

    Hi,

    If you place re-create \includes\helper-privacy.php in your child theme and edit there it should work.

    Best regards,
    Jordan Shannon

    #969767

    Hi Jordan,

    thanks for your help. I created an \includes\helper-privacy.php file in Enfold child theme and changed the code as per the a/m, but that does not work. It only works in Enfold parent theme.

    Any idea how to solve in child theme? Thank you in advance.

    Kind regards,
    Sophie

    #970732

    Hi Sophie,

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?

    Best regards,
    Victoria

    #970800

    Hi Victoria,

    yes sure, please kindly find the login details in private content box. Thank you for your kind efforts in advance.

    Wish for you a nice day!

    Best regards,
    Sophie

    #970850

    Hi,

    I added the filter code to your enfold child functions.php

    
    add_filter('avf_privacy_comment_checkbox_error_message', 'avia_privacy_comment_checkbox_error_message', 10, 1);
    function avia_privacy_comment_checkbox_error_message($message)
    {
      $url = htmlspecialchars($_SERVER['HTTP_REFERER']);
      return "Fehler: Sie m&uuml;ssen unserer Datenschutzerkl&auml;rung zustimmen, um einen Kommentar schreiben zu k&ouml;nnen. <a href='$url'>Zur&uuml;ck zu den Kommentaren</a>.";
    }
    

    You can replace the text with a custom error message :)
    I recommend to delete the helper-privacy.php from the child theme folder because it’s not required.

    Best regards,
    Dude

    #970859

    Hi Dude,

    thank you so much for your help. Awesome, that is working fine :-) ! Just one thing: Can you please remove the link with my URL in the brackets in your a/m thread? Thank you in advance.

    Kind regards,
    Sophie

    #970867

    Hi,

    Sure :) – I’ll close this thread now.

    Best regards,
    Dude

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Translation of error box message | privacy policy message in comment form’ is closed to new replies.