-
AuthorPosts
-
September 22, 2021 at 3:01 pm #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
EvelynSeptember 27, 2021 at 2:49 pm #1322503Hey,
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-992984Best regards,
YigitSeptember 27, 2021 at 3:10 pm #1322510Thanks, 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,
EvelynOctober 3, 2021 at 4:31 pm #1323341Hi,
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 seeen_US & de_DE
as in your function but when I examined your site it was usingen & 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,
MikeOctober 4, 2021 at 8:34 am #1323397Hi,
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
EveOctober 4, 2021 at 12:58 pm #1323454Hi,
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,
MikeOctober 7, 2021 at 10:49 am #1323868The 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,
EvelynOctober 7, 2021 at 11:31 am #1323882Hmm, now I try it with Cookiebot, maybe it works better…
October 9, 2021 at 4:02 pm #1324218 -
AuthorPosts
- You must be logged in to reply to this topic.