andysuchann Posted May 12, 2022 Share Posted May 12, 2022 Site URL: https://cahcal-fr.squarespace.com/ I'm having difficulty with translating the month in my calendar on my website. I've changed the language setting in the navigation, which translated majority of the website to French, however, it did not translate the month on my calendar page. Does anyone know how I can fix this? Any help would be greatly appreciated! Calendar Page: https://cahcal-fr.squarespace.com/calendrier Pass: cahcal Link to comment
humxahafeex Posted May 12, 2022 Share Posted May 12, 2022 12 minutes ago, andysuchann said: Site URL: https://cahcal-fr.squarespace.com/ I'm having difficulty with translating the month in my calendar on my website. I've changed the language setting in the navigation, which translated majority of the website to French, however, it did not translate the month on my calendar page. Does anyone know how I can fix this? Any help would be greatly appreciated! Calendar Page: https://cahcal-fr.squarespace.com/calendrier Pass: cahcal Hi It's possible , will you please let us know on what plan of squares pace you are using personal or business? Link to comment
andysuchann Posted May 12, 2022 Author Share Posted May 12, 2022 4 minutes ago, humxahafeex said: Hi It's possible , will you please let us know on what plan of squares pace you are using personal or business? It will be a Business Account once I purchase it and push the site live. Link to comment
humxahafeex Posted May 12, 2022 Share Posted May 12, 2022 11 minutes ago, andysuchann said: It will be a Business Account once I purchase it and push the site live. Awesome let me try to do a code for it and post it here in a while. Link to comment
andysuchann Posted May 12, 2022 Author Share Posted May 12, 2022 4 minutes ago, humxahafeex said: Awesome let me try to do a code for it and post it here in a while. Thanks so much - really appreciate! I'm looking to translate the months to French so they would be: janvier - January février - February mars - March avril - April mai - May juin - June juillet - July aout - August septembre -September octobre - October novembre - November décembre - December Link to comment
humxahafeex Posted May 12, 2022 Share Posted May 12, 2022 Hi Here's is the Code on how you can achieve this , Just copy and paste the code in Code Injection you , Simply go to Settings> Advanced> Code Injection In HEADER part add the following code: <script src = "https://code.jquery.com/jquery-2.2.4.min.js" ></script> In FOOTER part add the following code: <script> function translate(){ $(".yui3-calendar-header-label").text(function(){ var month = $(this).text(); month = month.toString(); for (var i=0;i<12;i++) { if (month.includes(arr_month_english[i])){ return $(this).text().replace(arr_month_english[i], arr_month_trans[i]);} } }); } const arr_month_trans = ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Aout", "Septembre", "Octobre", "Novembre", "Décembre"]; const arr_month_english = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; $(document).ready(function() { setTimeout(translate, 2000); $(document).on('click','.yui3-calendarnav-prevmonth',function(){translate();}); $(document).on('click','.yui3-calendarnav-nextmonth',function(){translate();}); }); </script> It's DONE, Enjoy , Do Mark it solved if it works for you 🙂 Hey, If my solution helped you don't hesitate to Buy me a coffee : https://www.buymeacoffee.com/hamxahafeex sigmundelias and MicheleSterchele 1 1 Link to comment
andysuchann Posted May 13, 2022 Author Share Posted May 13, 2022 tHIS 14 hours ago, humxahafeex said: Hi Here's is the Code on how you can achieve this , Just copy and paste the code in Code Injection you , Simply go to Settings> Advanced> Code Injection In HEADER part add the following code: <script src = "https://code.jquery.com/jquery-2.2.4.min.js" ></script> In FOOTER part add the following code: <script> function translate(){ $(".yui3-calendar-header-label").text(function(){ var month = $(this).text(); month = month.toString(); for (var i=0;i<12;i++) { if (month.includes(arr_month_english[i])){ return $(this).text().replace(arr_month_english[i], arr_month_trans[i]);} } }); } const arr_month_trans = ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Aout", "Septembre", "Octobre", "Novembre", "Décembre"]; const arr_month_english = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; $(document).ready(function() { setTimeout(translate, 2000); $(document).on('click','.yui3-calendarnav-prevmonth',function(){translate();}); $(document).on('click','.yui3-calendarnav-nextmonth',function(){translate();}); }); </script> It's DONE, Enjoy , Do Mark it solved if it works for you 🙂 Hey, If my solution helped you don't hesitate to Buy me a coffee : https://www.buymeacoffee.com/hamxahafeex This worked, you're the best - thanks so much! Link to comment
humxahafeex Posted May 13, 2022 Share Posted May 13, 2022 9 minutes ago, andysuchann said: tHIS This worked, you're the best - thanks so much! Glad I could helped , Please mark it as solved it helped others as well. Link to comment
Solution paul2009 Posted May 13, 2022 Solution Share Posted May 13, 2022 23 hours ago, andysuchann said: I've changed the language setting in the navigation, which translated majority of the website to French, however, it did not translate the month on my calendar page. @andysuchann This should not happen and should not require custom code to fix. Squarespace have confirmed that this is caused by an issue with calendar dates on their end. It has been reported to their Engineering team, and they’re currently prioritizing the issue so that it can be fixed. e2astudio 1 Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links. Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional. Would you like your customers to be able to mark their favourite products in your Squarespace store? Link to comment
MicheleSterchele Posted March 24, 2023 Share Posted March 24, 2023 Thanks, i used the same code and changed the months into Italian, worked flawlessly, cheers! Link to comment
Sepia Posted May 20, 2023 Share Posted May 20, 2023 Hi -- My website is for a language school and we offer multiple languages and have multiple event calendars. I'm trying to change each calendar to its respective language. Is there any way to translate individual calendars and not site-wide? Link to comment
tuanphan Posted May 22, 2023 Share Posted May 22, 2023 On 5/20/2023 at 12:47 PM, Sepia said: Hi -- My website is for a language school and we offer multiple languages and have multiple event calendars. I'm trying to change each calendar to its respective language. Is there any way to translate individual calendars and not site-wide? You try pasting above code to Page Header, not Sidewide Code Injection 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!) Link to comment
Sepia Posted May 23, 2023 Share Posted May 23, 2023 On 5/21/2023 at 7:18 PM, tuanphan said: You try pasting above code to Page Header, not Sidewide Code Injection I tried this, it did not seem to work. 😞 Link to comment
humxahafeex Posted May 25, 2023 Share Posted May 25, 2023 On 5/24/2023 at 2:13 AM, Sepia said: I tried this, it did not seem to work. 😞 Hi Sepia, Please make sure you are pasting the code in the individual page header setting , you can access this setting by hovering on page as you hover gear icon appears , click on that gear icon , pop up will open up , on that pop up click on Advance , then paste the code , it should work , if not let us know we are here to help you out. Link to comment
Fryskstyler Posted June 26 Share Posted June 26 On 5/13/2022 at 4:03 PM, paul2009 said: @andysuchann This should not happen and should not require custom code to fix. Squarespace have confirmed that this is caused by an issue with calendar dates on their end. It has been reported to their Engineering team, and they’re currently prioritizing the issue so that it can be fixed. june 2024 -> What's the status? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment