--- CalendarPlugin.pm.v1.006 Wed May 7 07:08:29 2003 +++ CalendarPlugin.pm Wed May 7 07:49:00 2003 @@ -158,6 +158,10 @@ my $m = scalar &TWiki::Func::extractNameValuePair( $attributes, "month" ); my $y = scalar &TWiki::Func::extractNameValuePair( $attributes, "year" ); + # read and set the desired language + my $lang = scalar &TWiki::Func::extractNameValuePair( $attributes, "lang" ); + Date::Calc::Language(Date::Calc::Decode_Language($lang)) if $lang; + # handle relative dates, too #cs# my $currentDay = (localtime)[3]; my $currentMonth = (localtime)[4] + 1; @@ -173,6 +177,13 @@ my $cal = new HTML::CalendarMonthSimple(month => $m, year => $y); + # set the day names in the desired language + if ($lang) { + $cal->saturday(Date::Calc::Day_of_Week_to_Text(6)); + $cal->sunday(Date::Calc::Day_of_Week_to_Text(7)); + $cal->weekdays(map { Date::Calc::Day_of_Week_to_Text $_ } (1..5)); + } + my $p = ""; while (($k,$v) = each %options) { $p = "HTML::CalendarMonthSimple::$k";