Jump to content

Blog Post: Translate date format and months from English to another language

Recommended Posts

Posted

how do you change the date format on forms. I need DD/MM/YYYYOrDD/MONTH/YYYY

The US dates are feeding into my calender and are screwing up my bookings. January 12th 2015 is becoming 1st Dec 2015.

Many Thanks

  • Replies 41
  • Views 32.1k
  • Created
  • Last Reply
Posted

how do you change the date format on forms. I need DD/MM/YYYYOrDD/MONTH/YYYY

The US dates are feeding into my calender and are screwing up my bookings. January 12th 2015 is becoming 1st Dec 2015.

Many Thanks

Posted

how do you change the date format on forms. I need DD/MM/YYYYOrDD/MONTH/YYYY

The US dates are feeding into my calender and are screwing up my bookings. January 12th 2015 is becoming 1st Dec 2015.

Many Thanks

Posted

how do you change the date format on forms. I need DD/MM/YYYYOrDD/MONTH/YYYY

The US dates are feeding into my calender and are screwing up my bookings. January 12th 2015 is becoming 1st Dec 2015.

Many Thanks

  • 3 months later...
  • 2 weeks later...
Posted

I have tried all of the suggested options. Not a single one worked with the Wells theme. Why is it so hard for Squarespace to offer a working option to localise your site?

Posted

I have tried all of the suggested options. Not a single one worked with the Wells theme. Why is it so hard for Squarespace to offer a working option to localise your site?

  • 3 months later...
Posted

If you just want to do a quick formatting, e.g. move fields around in the date field I used some jQuery to move the elements around, only useful for changing the order.

For example this moves the month over, changing it to DD MM YYYY.


$(document).ready(function () {
   dateFormat();
})

function dateFormat () {

       var $date = $('.sqs-col-6').last().find('.date');

       // find and kill month
       var $month = $date.find('.month');
       $date.find('.month').remove();

       // reinsert month behind day
       $month.insertAfter($date.find('.day'))
}

Just added the script and jQuery to a code block below the form.


<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.0/jquery.js'></script>
<script src="https://s3-ap-southeast-2.amazonaws.com/judy-nunn.com-assets/form.js"></script>

Posted

I think i'm missing something, I'm using Bedford template, when I put the code at the right place, save & reload, nothing seem to change ? any sugestion

Thank you

Posted

This code worked great for my actual blog, but I've set up the website so the blog is viewed through a List Summary Block on a page (Flatiron template). On that page the English date remains, even if I put the code in the page header code injection. Any workarounds? Thanks!

  • 2 months later...
  • 10 months later...
Posted

Very good script indeed!

Just one thing though, I have a problem getting the Summary to show blog post's dates to french...

Anyone got this problem? On my homepage, I put a Summary and chose BLOGS as content. The blog titles are fine but the date is still in english.

Help :) Thanks alot!!!

  • 2 months later...
Posted

Just back with the same question above, anyone tried to translate dates on Summary's?Here's a screenshot of one. The text under the summary has date and author. The date is english (the month name) and can't find a way to translate it. That's the only item I couldn't translate.

alt text

screen-shot-2017-03-03-at-092529.png.39e006052b3bcffb3d8cf01514dac844.png

  • 10 months later...
  • 2 years later...
  • 10 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.