PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Translate Calendar

  1. cristianltorres

    hi guys!

    I need to translate the language of the datepicker, to spanish.

    And also I need the calendar to start on monday instead of sunday.

    Can you help me please?

    Posted 9 years ago on Thursday December 13, 2012 | Permalink
  2. The jQuery UI datepicker can be localized:

    Setting the region should also take care of starting the week on Monday, but you can also change the start day of the week:

    Posted 9 years ago on Friday December 14, 2012 | Permalink
  3. cristianltorres

    Hi Chris, thanks for your answer, Im sorry Im a little bit rookie in this matters.

    I've found the localization file: jquery.ui.datepicker-es.js

    But I get lost in the instruccions in this part:
    It should then set these values as global defaults so that they are automatically applied when this JavaScript is loaded: $.datepicker.setDefaults($.datepicker.regional['<language>']);. ...."

    wich gravity form file do I have to modify so it works?


    Posted 9 years ago on Friday December 14, 2012 | Permalink
  4. cristianltorres

    Im assuming that the file jquery.ui.datepicker-es.js goes in this folder:


    Posted 9 years ago on Friday December 14, 2012 | Permalink
  5. Don't modify any Gravity Forms files.

    I would put the language file in your child theme folder, in a js folder beneath that. Something like this:


    Then, you need to include that in the footer of the page where the form is loaded.

    Use the WordPress wp_enqueue_script function to make sure the script is loaded in the footer and after jQuery and the jQuery UI datepicker script is loaded.

    That will load the translation file in the footer of your page. View the source of the page and find the script link, then try accessing the file by URL in your browser to make sure you have the path correct.

    The additional JavaScript to make the language choice global will be added to the header (or footer, I think) section of the page. You can save this script to a file, and enqueue it in the same way:

    jQuery(document).ready(function($) {

    Let us know after you have tried that and link to the page with your datepicker on it if you need any additional assistance.

    Posted 9 years ago on Saturday December 22, 2012 | Permalink
  6. cristianltorres

    Thanks for your answer Chris, but 2 days after I post my last reply, I've managed to work it out in this way:

    1 - I manually translate the days and months in this file: gravityforms/js/jquery-ui/ui.datepicker.js
    2. I follow these instructions here:
    In order to make "monday" the first day of the week, instead of sunday.

    Thanks anyway!

    Posted 9 years ago on Tuesday January 8, 2013 | Permalink
  7. Thank you for the update.

    Posted 9 years ago on Tuesday January 8, 2013 | Permalink

This topic has been resolved and has been closed to new replies.