gab Posted December 19, 2022 Posted December 19, 2022 (edited) Hello everyone, I would need to have the cookies banner (with opt-in & out) in two different languages. is this possible? I followed the code from Bradgood.net for creating the dual language site Thanks in advance for you help! www.gyrotonicinselberlin.com Passw: Anneli Edited December 19, 2022 by gab
tuanphan Posted December 21, 2022 Posted December 21, 2022 Hi, Can you enable cookie banner? We can test code easier With Footer, I answered your message, if it works, you can post here for future members Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
gab Posted December 21, 2022 Author Posted December 21, 2022 6 hours ago, tuanphan said: Hi, Can you enable cookie banner? We can test code easier With Footer, I answered your message, if it works, you can post here for future members thanks a lot for you message, the footer works very well by duplicating the footer and then using this code in each of the pages: <style> [data-section-id=] { display: none; } </style> i.e. on the page I want to hide the English footer I insert the section id of the German footer and vice versa. I activated the cookie banner again so you can have a look. Thanks a lot!
tuanphan Posted December 24, 2022 Posted December 24, 2022 On 12/19/2022 at 8:29 PM, gab said: Hello everyone, I would need to have the cookies banner (with opt-in & out) in two different languages. is this possible? I followed the code from Bradgood.net for creating the dual language site Thanks in advance for you help! www.gyrotonicinselberlin.com Passw: Anneli Can you check it again? I don't see cookies banner now Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
gab Posted December 24, 2022 Author Posted December 24, 2022 8 hours ago, tuanphan said: Can you check it again? I don't see cookies banner now it was on all the time. But I re activated "activity log", maybe that's why you don't see it. I suppose you are checking it out with a incognito tab?
gab Posted December 27, 2022 Author Posted December 27, 2022 On 12/24/2022 at 2:55 AM, tuanphan said: Can you check it again? I don't see cookies banner now this is how it looks like:
tuanphan Posted December 29, 2022 Posted December 29, 2022 Add to Page Header of each page <script> $(document).ready(function(){ $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace("Durch die Nutzung dieser Website stimmst Du unserer Verwendung von ", "new text"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace("Cookies", "new text 2"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace(" zu. Wir verwenden ", "new text 3"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace(", um nützliche Funktionen anzubieten und die Leistung zu messen, um Dein Erlebnis zu verbessern. Weitere Informationen findest du in unserer ", "new text 4"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace("Datenschutzrichtlinie", "new text 5"); }); }); </script> If it doesnt work, try this <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script> <script> $(document).ready(function(){ $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace("Durch die Nutzung dieser Website stimmst Du unserer Verwendung von ", "new text"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace("Cookies", " new text 2"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace(" zu. Wir verwenden ", " new text 3"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace(", um nützliche Funktionen anzubieten und die Leistung zu messen, um Dein Erlebnis zu verbessern. Weitere Informationen findest du in unserer ", " new text 4"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace("Datenschutzrichtlinie", " new text 5"); }); }); </script> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
gab Posted December 30, 2022 Author Posted December 30, 2022 On 12/29/2022 at 4:40 AM, tuanphan said: Add to Page Header of each page <script> $(document).ready(function(){ $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace("Durch die Nutzung dieser Website stimmst Du unserer Verwendung von ", "new text"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace("Cookies", "new text 2"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace(" zu. Wir verwenden ", "new text 3"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace(", um nützliche Funktionen anzubieten und die Leistung zu messen, um Dein Erlebnis zu verbessern. Weitere Informationen findest du in unserer ", "new text 4"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace("Datenschutzrichtlinie", "new text 5"); }); }); </script> If it doesnt work, try this <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script> <script> $(document).ready(function(){ $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace("Durch die Nutzung dieser Website stimmst Du unserer Verwendung von ", "new text"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace("Cookies", " new text 2"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace(" zu. Wir verwenden ", " new text 3"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace(", um nützliche Funktionen anzubieten und die Leistung zu messen, um Dein Erlebnis zu verbessern. Weitere Informationen findest du in unserer ", " new text 4"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace("Datenschutzrichtlinie", " new text 5"); }); }); </script> Thanks a lot!, the second option worked out. I just modified some spacing issues so the underline text fits into the translated word. What is left now is how to translate the "accept" (Akzeptieren) and "decline" (ablehnen) options. And also how to link the words "Cookies" and "Privacy Policy" to the english version to their respective pages.
tuanphan Posted January 2, 2023 Posted January 2, 2023 Use this new code <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script> <script> $(document).ready(function(){ $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace("Durch die Nutzung dieser Website stimmst Du unserer Verwendung von ", "new text"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace("Cookies", " new text 2"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace(" zu. Wir verwenden ", " new text 3"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace(", um nützliche Funktionen anzubieten und die Leistung zu messen, um Dein Erlebnis zu verbessern. Weitere Informationen findest du in unserer ", " new text 4"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace("Datenschutzrichtlinie", " new text 5"); }); $(".sqs-cookie-banner-v2 button").html(function() { return $(this).html().replace("Akzeptieren", " accept"); }); $(".sqs-cookie-banner-v2 button").html(function() { return $(this).html().replace("Ablehnen", " accept 2"); }); $('.sqs-cookie-banner-v2-text a[href*="cookies"]').attr('href','https://newcookies.com'); $('.sqs-cookie-banner-v2-text a[href*="datenschutz"]').attr('href','https://privacypolicy.com'); }); </script> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
gab Posted January 21, 2023 Author Posted January 21, 2023 On 1/2/2023 at 7:43 AM, tuanphan said: Use this new code <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script> <script> $(document).ready(function(){ $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace("Durch die Nutzung dieser Website stimmst Du unserer Verwendung von ", "new text"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace("Cookies", " new text 2"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace(" zu. Wir verwenden ", " new text 3"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace(", um nützliche Funktionen anzubieten und die Leistung zu messen, um Dein Erlebnis zu verbessern. Weitere Informationen findest du in unserer ", " new text 4"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace("Datenschutzrichtlinie", " new text 5"); }); $(".sqs-cookie-banner-v2 button").html(function() { return $(this).html().replace("Akzeptieren", " accept"); }); $(".sqs-cookie-banner-v2 button").html(function() { return $(this).html().replace("Ablehnen", " accept 2"); }); $('.sqs-cookie-banner-v2-text a[href*="cookies"]').attr('href','https://newcookies.com'); $('.sqs-cookie-banner-v2-text a[href*="datenschutz"]').attr('href','https://privacypolicy.com'); }); </script> Hi Tuanpan, I have used the new code, but now it has stopped working completely. Can you detect any errors?
tuanphan Posted January 26, 2023 Posted January 26, 2023 On 1/21/2023 at 5:21 PM, gab said: Hi Tuanpan, I have used the new code, but now it has stopped working completely. Can you detect any errors? It looks like an invalid symbol. Can you send all current code? Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
gab Posted January 30, 2023 Author Posted January 30, 2023 On 1/26/2023 at 6:27 PM, tuanphan said: It looks like an invalid symbol. Can you send all current code? <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script> <script> $(document).ready(function(){ $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace("Durch die Nutzung dieser Website stimmst Du unserer Verwendung von ", "By using this website you agree to our use of"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace("Cookies", " Cookies"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace(" zu. Wir verwenden ", " We use"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace(", um nützliche Funktionen anzubieten und die Leistung zu messen, um Dein Erlebnis zu verbessern. Weitere Informationen findest du in unserer ", " to provide useful features and measure performance to improve your experience. For more information, please see our"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace("Datenschutzrichtlinie", " privacy policy."); }); $(".sqs-cookie-banner-v2 button").html(function() { return $(this).html().replace("Akzeptieren", " Accept); }); $(".sqs-cookie-banner-v2 button").html(function() { return $(this).html().replace("Ablehnen", " Decline); }); $('.sqs-cookie-banner-v2-text a[href*="cookies"]').attr('href','https://www.gyrotonicinselberlin.com/imprint/#cookies'); $('.sqs-cookie-banner-v2-text a[href*="datenschutz"]').attr('href','https://www.gyrotonicinselberlin.com/imprint/#datenschutz'); }); }); </script> On 1/2/2023 at 7:43 AM, tuanphan said: Use this new code <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script> <script> $(document).ready(function(){ $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace("Durch die Nutzung dieser Website stimmst Du unserer Verwendung von ", "new text"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace("Cookies", " new text 2"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace(" zu. Wir verwenden ", " new text 3"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace(", um nützliche Funktionen anzubieten und die Leistung zu messen, um Dein Erlebnis zu verbessern. Weitere Informationen findest du in unserer ", " new text 4"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace("Datenschutzrichtlinie", " new text 5"); }); $(".sqs-cookie-banner-v2 button").html(function() { return $(this).html().replace("Akzeptieren", " accept"); }); $(".sqs-cookie-banner-v2 button").html(function() { return $(this).html().replace("Ablehnen", " accept 2"); }); $('.sqs-cookie-banner-v2-text a[href*="cookies"]').attr('href','https://newcookies.com'); $('.sqs-cookie-banner-v2-text a[href*="datenschutz"]').attr('href','https://privacypolicy.com'); }); </script> Hi Tuanpan, I have used the new code, but now it has stopped working completely. Can you detect any errors?
tuanphan Posted February 2, 2023 Posted February 2, 2023 On 1/30/2023 at 3:44 PM, gab said: <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script> <script> $(document).ready(function(){ $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace("Durch die Nutzung dieser Website stimmst Du unserer Verwendung von ", "By using this website you agree to our use of"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace("Cookies", " Cookies"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace(" zu. Wir verwenden ", " We use"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace(", um nützliche Funktionen anzubieten und die Leistung zu messen, um Dein Erlebnis zu verbessern. Weitere Informationen findest du in unserer ", " to provide useful features and measure performance to improve your experience. For more information, please see our"); }); $(".sqs-cookie-banner-v2-text p").html(function() { return $(this).html().replace("Datenschutzrichtlinie", " privacy policy."); }); $(".sqs-cookie-banner-v2 button").html(function() { return $(this).html().replace("Akzeptieren", " Accept); }); $(".sqs-cookie-banner-v2 button").html(function() { return $(this).html().replace("Ablehnen", " Decline); }); $('.sqs-cookie-banner-v2-text a[href*="cookies"]').attr('href','https://www.gyrotonicinselberlin.com/imprint/#cookies'); $('.sqs-cookie-banner-v2-text a[href*="datenschutz"]').attr('href','https://www.gyrotonicinselberlin.com/imprint/#datenschutz'); }); }); </script> Hi Tuanpan, I have used the new code, but now it has stopped working completely. Can you detect any errors? The code looks correct. Can you duplicate the site & add me as a contributor on that duplicated? I will take a look Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
gab Posted February 28, 2023 Author Posted February 28, 2023 Hi Tuanpan, sorry for the delay somehow I didn't saw the notification of your reply. Sure you can have it, but I need your Email address for that Thanks a lot Gabriel
tuanphan Posted March 5, 2023 Posted March 5, 2023 On 2/28/2023 at 3:39 PM, gab said: Hi Tuanpan, sorry for the delay somehow I didn't saw the notification of your reply. Sure you can have it, but I need your Email address for that Thanks a lot Gabriel You can send via private message Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment