This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 3

Dutch version of the calendar


  1. chriskoeling
    Member

    Hi There,

    I was wondering if there is a dutch version of the calendar? The front end is english, even when I select dutch as default language. The date is also set as english date in the database and in the email that is send to the user. How can I change that?

    Kind regards, Chris

    Posted 12 years ago #
  2. yuniar

    Yes, there is the Dutch version already. You can edit the "includes/view-functions.php" file. Search for this code:

    $calendar_init = '<script type="text/javascript" src="'.$machform_path.'js/datepick/jquery.datepick.js"></script>'."\n".
    			 '<script type="text/javascript" src="'.$machform_path.'js/datepick/jquery.datepick.ext.js"></script>'."\n".
    			 '<link type="text/css" href="'.$machform_path.'js/datepick/smoothness.datepick.css" rel="stylesheet" />';

    you need to insert one additional line which load the dutch language, so the code become like this:

    $calendar_init = '<script type="text/javascript" src="'.$machform_path.'js/datepick/jquery.datepick.js"></script>'."\n".
    			'<script type="text/javascript" src="'.$machform_path.'js/datepick/jquery.datepick-nl.js"></script>'."\n".
    			'<script type="text/javascript" src="'.$machform_path.'js/datepick/jquery.datepick.ext.js"></script>'."\n".
    			'<link type="text/css" href="'.$machform_path.'js/datepick/smoothness.datepick.css" rel="stylesheet" />';

    MachForm Founder

    Posted 12 years ago #
  3. yuniar

    Err...the forum doesn't seems to display the code nice.
    Here is the final code again:

    http://pastie.org/4295212


    MachForm Founder

    Posted 12 years ago #
  4. chriskoeling
    Member

    Works perfect, thank you!

    Posted 12 years ago #
  5. chriskoeling
    Member

    Is there also a way to show more years then 20 in the list? I have a birthday date field where I would like to show the years from 1920 until now. Without explaining to users how they must navigate true the calendar drop-down?

    Posted 12 years ago #
  6. yuniar

    Yes, you might want to check this post:
    http://www.appnitro.com/forums/topic/date-control-gives-only-20-years-span?replies=4#post-14161


    MachForm Founder

    Posted 12 years ago #
  7. chriskoeling
    Member

    Dutch version of calendar and drop down of years works perfect at the front end. How can I change the value in the email that is send. I keep getting Oct instead of Okt for the dutch oktober.

    Posted 12 years ago #
  8. yuniar

    Ah yes, this one require some changes within the PHP file. You need to edit the "includes/entry-functions.php".

    Search around line 506 for this code:

    $date_value = date("M d, Y",strtotime($date_value));

    change it to become:

    setlocale(LC_TIME, "nl_NL");
    $date_value = strftime("%h %d, %Y",strtotime($date_value));

    Then search around line 514:

    $date_value = date("d M Y",strtotime($date_value));

    change it to become:

    setlocale(LC_TIME, "nl_NL");
    $date_value = strftime("%d %h, %Y",strtotime($date_value));

    MachForm Founder

    Posted 12 years ago #
  9. chriskoeling
    Member

    Perfect...it works :-)

    Thank YOU!

    Posted 12 years ago #
  10. Lokidog
    Member

    I also used this to get a Swedish calendar, inserting se_SV for nl_NL.

    Works great, the final piece of the jigsaw puzzle to make all our stuff Swedish!

    Thankyou!

    Posted 12 years ago #
  11. bigJS
    Member

    I did the same with german version of the datepicker. It works well, but if I set some restrictions, e. g. minimum/maximum dates, it uses the worn month and year. What's wrong?

    Posted 11 years ago #
  12. yuniar

    What do you mean by using the wrong month and year? Do you have an URL I could check?


    MachForm Founder

    Posted 11 years ago #
  13. bigJS
    Member

    Yes, please have a look here:
    http://212.227.232.20/forms/view.php?id=12601

    Posted 11 years ago #
  14. bigJS
    Member

    No answer?

    Posted 11 years ago #
  15. yuniar

    I'm sorry, I actually have checked this but don't have the solution yet. It seems to be a bug and we'll need to debug this further.
    I'm putting this into our bug database list.


    MachForm Founder

    Posted 11 years ago #
  16. bigJS
    Member

    Good to know. Thanks.
    Nevertheless keep up the good work!

    Best Regards.

    Posted 11 years ago #

RSS feed for this topic

Reply