Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1321929

    Hi,
    meine Website ist mehrsprachig – DE und EN.
    Nun ist es so, dass die bei Klick auf “Einstellungen” im Cookie-Banner der Text beim Zustimmen auf Englisch ist, aber alles andere auf Deutsch. Ich hätte gerne für die deutsche Website alles auf Deutsch und für die englische Website alles auf Englisch > also die Texte im Cookie – Banner & Co.
    Könnt ihr mir hier bitte weiterhelfen?
    Link zur Website: chalet-georg.at
    Das wäre wirklich super!
    LG
    Evelyn

    #1322503

    Hey,

    Thanks for contacting us!

    When using Polylang, you will have to create a custom shortcode to display different content for each language in the cookie consent message container. Please check the following threads for more info.

    // https://kriesi.at/support/topic/polylang-in-socket/#post-1269102
    // https://kriesi.at/support/topic/cookie-consent-message-erscheint-immer-wieder/#post-992984

    Best regards,
    Yigit

    #1322510

    Thanks, but that doesn’t work – I have tried it, but the text was in English for german website also the text to agree in the settings.
    Maybe you can help me again?
    Best regards,
    Evelyn

    #1323341

    Hi,
    Thank you for your patience and the login to your site, I found that for your custom shortcode [polylang_cookie_message]
    the language codes didn’t match your site, typically I would see en_US & de_DE as in your function but when I examined your site it was using en & de so I changed your function to this and nw it works correctly:

    add_shortcode( 'polylang_cookie_message', 'avia_polylang_cookie_message' );
    function avia_polylang_cookie_message() 
    {
    	$message = 'I agree to the terms and conditions laid out in the <a href="https://mywebsite.com/privacy/">Privacy Policy</a>';
    
        	$lang = pll_current_language('locale');
    		switch ($lang)
    		{
    			case 'en':
    			$message = 'I agree to the terms and conditions laid out in the <a href="https://mywebsite.com/privacy/">Privacy Policy</a>';
    			break;
    			case 'de':
    			$message = 'Durch die Nutzung unserer Angebote erklären Sie sich mit dem Setzen von Cookies einverstanden. Mehr erfahren Sie in unserer <a href="https://mywebsite.com/datenschutz/">Datenschutzerklärung</a>.';
    			break;
    		}
    
    	return $message;
    }

    It looks like your Polylang plugin allows you to manually set the language codes.

    Best regards,
    Mike

    #1323397

    Hi,
    thank you for helping, that works when I activate the “Enable cookie consent messages” but then the font of all my titles in content change … that’s not good! What happened there?
    And the description of the cookies is also in english on the german website…. Where can I change the descriptions of Essential Website Cookies, etc.
    Thanks a lot.
    Best Regards
    Eve

    #1323454

    Hi,
    The only time I saw the cookie message was when the “Enable cookie consent messages” was activated, isn’t this what you meant? Perhaps I misunderstood. With Polylang I believe you need to use the Strings Translations to change the text language, I don’t believe it’s going to change automatically because Polylang changed the language codes.

    Best regards,
    Mike

    #1323868

    The problem is also, that the font of my website content is changing, when I activate the “Enable cookie consent messages”. There is a problem anywhere.
    And the other thing is, that I don’t know how I can manage the language for the cookie text with Polylang… What kind of Cookie Consent System do we have here? So, maybe I can search via Google…
    Thanks for answering and best regards,
    Evelyn

    #1323882

    Hmm, now I try it with Cookiebot, maybe it works better…

    #1324218

    Hi,
    Did you find a way for your Cookiebot plugin to work with Polylang? I have not used this plugin so I can’t advise.

    Best regards,
    Mike

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.