While trying out language switcher together with the calendar. I put this to the beginning of the script:
$lang = substr($page->url,1,2);
$lang_code = ($lang=='en')?'en_US':$lang.'_'.strtoupper($lang);//works not for all countries but most of them (fr, de, it, nl, is, ru, es, tr)
setlocale(LC_TIME, $lang_code);
and changed the forward backward links:
$out .= "<a href='/".$lang."/calendar/". date('Y', $lastMonth) ."/". date('m', $lastMonth) ."/'>←</a>";
$out .= "<a href='/".$lang."/calendar/". date('Y', $endTime) ."/". date('m', $endTime) ."/'>→</a>";
I am using url-segments for year and month, like ryan recommended
$year = ($input->urlSegment1)?$input->urlSegment1:date('Y');
$month = ($input->urlSegment2)?$input->urlSegment2:date('m');
this will put out the current month as standard under the url en/calendar/
echo renderCalendar($page, $year, $month, $field = 'startdate');
its good to have such an easy going calendar. Thanks. Fun (while working with PW) has already started. kixe