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
Started 12 years ago by chriskoeling | 16 posts |
-
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 # -
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 # -
Err...the forum doesn't seems to display the code nice.
Here is the final code again:MachForm Founder
Posted 12 years ago # -
Works perfect, thank you!
Posted 12 years ago # -
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 # -
Yes, you might want to check this post:
http://www.appnitro.com/forums/topic/date-control-gives-only-20-years-span?replies=4#post-14161MachForm Founder
Posted 12 years ago # -
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 # -
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 # -
Perfect...it works :-)
Thank YOU!
Posted 12 years ago # -
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 # -
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 # -
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 # -
Yes, please have a look here:
http://212.227.232.20/forms/view.php?id=12601Posted 11 years ago # -
No answer?
Posted 11 years ago # -
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 # -
Good to know. Thanks.
Nevertheless keep up the good work!Best Regards.
Posted 11 years ago #
Reply
You must log in to post.