• Resolved Sami Peltonen

    (@designsamipeltonen)


    Hi,

    I’d like to have the Proof Of Consent document in two different languages.
    Looks like Complianz translates the document automatically into the language that is currently active in the WordPress settings.

    So, after having read these two documents:

    https://complianz.io/changing-the-text-in-your-legal-documents/

    and

    https://complianz.io/editing-legal-documents/,

    I’d like to ask the following questions:

    1. Is it possible to translate the POC, while also allowing it to be updated automatically by Complianz? Is the PHP filter method the only way here?

    2. If it’s possible to translate the POC with a PHP filter, could you elaborate a little bit on how to achieve it? The example in the article seemed a bit too vague for someone as limited in PHP as me.
    For example, what would be the code snippet for translating the “Proof of Consent” headline of the document?

    3. The POC contains the Cookie Consent Settings. Some of these settings are not translated automatically by Complianz.
    Is it possible to translate these settings with a translation plugin, or would the PHP method also work here?
    I tried translation with Polylang + “Theme and plugin translation for Polylang”, but couldn’t access the strings.

    4. Would the paid version of Complianz solve all my problems?

    Apologies for the very long message. I’m only asking the questions because I really think Complianz is one of the best plugins out there for WordPress.

    Yours,

    Sami

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor jarnovos

    (@jarnovos)

    Hi @designsamipeltonen,

    1). Complianz uses the main/site Language (as configured under WordPress Settings > General) to generate the Proof of Consent document. For example: having English configured as the Site Language and generating the Proof of Consent document, then switching to German and generating the document once more will result in English and German versions being created.

    2). If the above doesn’t suffice and you would still need to replace certain words or sentences in the Cookie Policy text (and as that document is used for the Proof of Consent snapshot, therefore reflected in the PDF), you could use the second snippet provided in the “Changing the text in your Legal Documents” article.

    The below example replaces Cookies with Biscuits, and We ask your permission to place statistics cookies. with We ask your permission to place analytics cookies.

    <?php
    function cmplz_edit_document_html($html){
      $old_strings = array("Cookies", "We ask your permission to place statistics
    cookies.");
      $new_strings = array("Biscuits", "We ask your permission to place analytics
    cookies.");
      $html = str_replace($old_strings, $new_strings, $html);
    return $html;
    }
    
    add_filter('cmplz_document_html', 'cmplz_edit_document_html', 10, 3);

    As for 3), I suspect that the option names themselves might not be translatable, and that the ‘values’ next to the options are displayed how they are entered/saved in Complianz, and therefore not affected by String Translation in PolyLang.

    Hope it helps!
    Kind regards,
    Jarno

    Thread Starter Sami Peltonen

    (@designsamipeltonen)

    Thank you again for a great answer. I’ll follow your instructions.

    -Sami

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Translating Proof of Consent’ is closed to new replies.