Ugedag og måned skal vises på dansk...
Jeg har et shareware kalender script som jeg har liggende på et webhotel hos Azero. Mit problem er at ugedag og måned vises på engelsk.Hvad kan jeg gøre?
Jeg viser lidt af scriptet her:
<%
'************************************************
'***** FUNCTIONS *********
'************************************************
Sub DisplayCalendar(mMonth, yYear)
dDay = DateSerial(yYear,mMonth,1)
mMonth = Month(dDay)
yYear = Year(dDay)
FirstDayOfMonth = Weekday(dDay)
'## Display the Top of Calendar ##
CALL DisplayCalendarTop(dDay)
'## Start Displaying the Actual Calendar ##
Response.Write "<Table Align=center width=" & TableWidth & " CellPadding=3 CellSpacing=1 Border=1 BgColor=" & BgColor & ">" & vbCrlf
Response.Write "<TR Valign=Top Align=Center BgColor=" & bgcolor & ">" & vbCrlf
For i = vbSunday To vbSaturday
Response.Write "<TD><Font Size='-2'><b>" & left(WeekDayName(i), 3) & "</b></Font></TD>" & vbCrlf
Next
Response.Write "</TR>" & vbCrlf
'## Set dDay to the First day of the month ##
dDay = DateSerial(yYear,mMonth,1)
FOR j=1 to 6
Response.Write "<TR>" & vbCrlf
FOR i=vbSunday to vbSaturday
CellStr="<Font size=-3> </Font>"
Color=cellcolor
If WeekDay(dDay) = i and Month(dDay) = mMonth then
'## Set Color to Yellow if Current Day
if (Day(dDay) = Day(now)) and (Month(dDay) = Month(now)) and (Year(dDay) = Year(now)) then Color="Yellow"
CellStr = "<a href='Update.asp?d=" & dDay & "'><Font size=-2>" & Day(dDay) & "</Font></a><BR>"
'## Get the Memo Field out of Database for current Date
Memo = GetCellData(dDay)
IF Memo <> "" then
'## Format Cell String if there is a Memo ##
CellStr ="<a href='Update.asp?d=" & dDay & "'><Font size=-2>" & Day(dDay) & "</Font></a><BR>" & "<a href=#" & dDay & "><img alt='View Day' border=0 src=" & ViewDayImage & "></a>"
'## Save Calendar Details to Print After the Calendar is Displayed ##
Details = Details & "<Table Align=center width=" & TableWidth & " cellspacing=2 cellpadding=3 border=0>" & vbCrlf
Details = Details & "<TR>" & vbCrlf
Details = Details & " <TD width=" & TableWidth-10 & " bgcolor='" & Bgcolor & "'>" & vbCrlf
Details = Details & " <a name='" & dDay & "'><Font Size=-1>" & Ucase(WeekDayName(weekday(dDay))) & " " & Ucase(MonthName(Month(dDay))) & " " & Day(dDay) & " , " & Year(dDay) & "</Font>" & vbCrlf
Details = Details & " </TD>" & vbCrlf
Details = Details & " <TD Align=right bgcolor='" & BgColor & "'>" & vbCrlf
Details = Details & "<a href='Update.asp?d=" & dDay & "'>" & EditImage & "</a> "
Details = Details & "<a href='Delete.asp?d=" & dDay & "'>" & DeleteImage & "</a> "
Details = Details & "<a href=#top>" & ToTopImage & "</a>"
Details = Details & " </TD>" & vbCrlf
Details = Details & "</TR>" & vbCrlf
Details = Details & "</Table>" & vbCrlf
Details = Details & "<Table Align=center width=" & TableWidth & " cellspacing=2 cellpadding=3 border=0>" & vbCrlf
Details = Details & "<TR>" & vbCrlf
Details = Details & " <TD bgcolor='" & color & "'>" & vbCrlf
Details = Details & " <PRE><Font Face=arial>" & Memo & "</Font></PRE>" & vbCrlf
Details = Details & " </TD>" & vbCrlf
Details = Details & "</TR>" & vbCrlf
Details = Details & "</Table>" & vbCrlf
'## End Calendar Details ##
End If
'## Get the Next Day
dDay = DateAdd("d",1,dDay)
End If
Response.Write "<TD vAlign=top align=left BgColor='" & Color & "'>" & CellStr & "</TD>" & vbCrlf
NEXT '## FOR i=vbSunday to vbSaturday ##
Response.Write "</TR>" & vbCrlf
NEXT '## For j=1 to 6 ##
Response.Write "</Table>" & vbCrlf
'## Display the Months at the bottom of the calendar ##
CALL DisplayMonths()
'## Display the Calendar Details ##
Response.write "<BR>" & Details & "<BR><BR>"
For i=1 to 50
Response.write "<BR>"
Next
End Sub
'************************************************
'************************************************
Sub DisplayCalendarTop(dDay)
Title = MonthName(month(dDay)) & " " & year(dDay)
pPREVIOUS = dateadd("m",-1, dDay)
nNEXT = dateadd("m",1,dDay)
Response.Write "<a name=top><TABLE Align=center CELLPADDING=0 CELLSPACING=0 WIDTH=" & TableWidth & " BORDER=1>" & vbCrlf
Response.Write "<TR VALIGN=MIDDLE ALIGN=CENTER>" & vbCrlf
Response.Write "<TD BgColor='" & BgColor & "' ALIGN=center>" & vbCrlf
Response.Write "<a href='" & request.servervariables("SCRIPT_NAME") & "?month=" & month(pPREVIOUS) & "&year=" & year(pPREVIOUS) & "'1><font FACE=WingDings>" & chr(239) & "</font></a>" & vbCrlf
Response.Write "</TD>" & vbCrlf
Response.Write "<TD BgColor='" & BgColor & "' ALIGN=center>" & vbCrlf
Response.Write "<B><small>" & Title & "</small></B>" & vbCrlf
Response.Write "</TD>" & vbCrlf
Response.Write "<TD BgColor='" & BgColor & "' ALIGN=center>" & vbCrlf
Response.Write "<a href='" & request.servervariables("SCRIPT_NAME") & "?month=" & month(nNEXT) & "&year=" & year(nNEXT) & "'><font FACE=WingDings>" & chr(240) & "</font></a>" & vbCrlf
Response.Write "</TD>" & vbCrlf
Response.Write "</TR>" & vbCrlf
Response.Write "</TABLE>" & vbCrlf
End Sub
'************************************************
'************************************************
Sub DisplayMonths()
Response.Write "<TABLE Align=center CELLPADDING=0 CELLSPACING=0 WIDTH=" & TableWidth & " BORDER=1 BORDERCOLORLIGHT=#FFFFFF>" & vbCrlf
Response.Write "<TR VALIGN=MIDDLE ALIGN=CENTER>" & vbCrlf
Response.Write "<TD BgColor='" & "#9999CC" & "' ALIGN=center>" & vbCrlf
Response.write "<Font size=-2>"
Response.Write " <a href='" & request.servervariables("SCRIPT_NAME") & "?month=1&year=" & year(now) & "'>Jan</a> " & vbCrlf
Response.Write " <a href='" & request.servervariables("SCRIPT_NAME") & "?month=2&year=" & year(now) & "'>Feb</a> " & vbCrlf
Response.Write " <a href='" & request.servervariables("SCRIPT_NAME") & "?month=3&year=" & year(now) & "'>Mar</a> " & vbCrlf
Response.Write " <a href='" & request.servervariables("SCRIPT_NAME") & "?month=4&year=" & year(now) & "'>Apr</a> " & vbCrlf
Response.Write " <a href='" & request.servervariables("SCRIPT_NAME") & "?month=5&year=" & year(now) & "'>May</a> " & vbCrlf
Response.Write " <a href='" & request.servervariables("SCRIPT_NAME") & "?month=6&year=" & year(now) & "'>Jun</a> " & vbCrlf
Response.Write "<BR>"
Response.Write " <a href='" & request.servervariables("SCRIPT_NAME") & "?month=7&year=" & year(now) & "'>Jul</a> " & vbCrlf
Response.Write " <a href='" & request.servervariables("SCRIPT_NAME") & "?month=8&year=" & year(now) & "'>Aug</a> " & vbCrlf
Response.Write " <a href='" & request.servervariables("SCRIPT_NAME") & "?month=9&year=" & year(now) & "'>Sep</a> " & vbCrlf
Response.Write " <a href='" & request.servervariables("SCRIPT_NAME") & "?month=10&year=" & year(now) & "'>Oct</a> " & vbCrlf
Response.Write " <a href='" & request.servervariables("SCRIPT_NAME") & "?month=11&year=" & year(now) & "'>Nov</a> " & vbCrlf
Response.Write " <a href='" & request.servervariables("SCRIPT_NAME") & "?month=12&year=" & year(now) & "'>Dec</a> " & vbCrlf
Response.Write "</Font>" & vbCrlf
Response.Write "</TD>" & vbCrlf
Response.Write "<TD BgColor='" & "#9999CC" & "' ALIGN=center>" & vbCrlf
Response.write "<a href=addnew.asp><font size=-2>Add</font></a>"
Response.Write "</TD>" & vbCrlf
Response.Write "</TR></TABLE>" & vbCrlf & vbCrlf
Response.Write "<Center><a href=year.asp><Font size=-2>View all months</Font></a></Center>"
Response.Write "<Center><a href=search.asp><Font size=-2>Search Calendar</Font></a></Center>"
Response.Write "<Center><a href=help.asp><Font size=-2>Help</Font></a></Center>"
End Sub
'************************************************
'************************************************
Function GetCellData(dDay)
Set rs = Server.CreateObject("ADODB.Recordset")
sSQL = "Select * from CalendarInfo where Date=#" & dDay & "#"
rs.open sSQL, Conn,3,3
GetCellData = ""
if rs.recordcount > 0 then GetCellData=rs("memo")
rs.close
Set rs = nothing
End Function
'************************************************
'************************************************
Sub DisplaySmallCalendar(mMonth, yYear)
Title = "<a href=calendar.asp?month=" & mMonth & "&year=" & yYear & ">" & MonthName(mMonth) & " " & yYear & "</a>"
dDay = DateSerial(yYear,mMonth,1)
mMonth = Month(dDay)
yYear = Year(dDay)
FirstDayOfMonth = Weekday(dDay)
Response.Write "<TABLE Align=center width=150 CELLPADDING=0 CELLSPACING=0 BORDER=1>" & vbCrlf
Response.Write "<TR VALIGN=MIDDLE ALIGN=CENTER>" & vbCrlf
Response.Write "<TD BgColor='" & BgColor & "' ALIGN=center>" & vbCrlf
Response.Write "<font size=-2>" & Title & "</font>" & vbCrlf
Response.Write "</TD>" & vbCrlf
Response.Write "</TR>" & vbCrlf
Response.Write "</TABLE>" & vbCrlf
'## Start Displaying the Actual Calendar ##
Response.Write "<Table width=150 Align=center CellPadding=3 CellSpacing=1 Border=1 BgColor='" & BgColor & "'>" & vbCrlf
Response.Write "<TR Valign=Top Align=Center BgColor='" & bgcolor & "'>" & vbCrlf
For i = vbSunday To vbSaturday
Response.Write "<TD><Font Size='-3'><b>" & left(WeekDayName(i), 1) & "</b></Font></TD>" & vbCrlf
Next
Response.Write "</TR>" & vbCrlf
'## Set dDay to the First day of the month ##
dDay = DateSerial(yYear,mMonth,1)
FOR j=1 to 6
Response.Write "<TR>" & vbCrlf
FOR i=vbSunday to vbSaturday
CellStr="<Font size=-3> </Font>"
Color=cellcolor
If WeekDay(dDay) = i and Month(dDay) = mMonth then
'## Set Color to Yellow if Current Day
if (Day(dDay) = Day(now)) and (Month(dDay) = Month(now)) and (Year(dDay) = Year(now)) then Color="Yellow"
CellStr = "<Font size=-3>" & Day(dDay) & "</Font>"
'## Get the Next Day
dDay = DateAdd("d",1,dDay)
End If
Response.Write "<TD vAlign=top align=left BgColor='" & Color & "'>" & CellStr & "</TD>" & vbCrlf
NEXT '## FOR i=vbSunday to vbSaturday ##
Response.Write "</TR>" & vbCrlf
NEXT '## For j=1 to 6 ##
Response.Write "</Table>" & vbCrlf
End Sub
'************************************************
'************************************************
Function CheckPwd(username,password)
Set rs = Server.CreateObject("ADODB.Recordset")
sSQL = "Select * from Passwords where username='" & username & "' and password='" & password & "'"
rs.open sSQL, Conn, 3, 3
CheckPwd = False
if rs.recordcount > 0 then CheckPwd = True
rs.close
set rs = nothing
End Function
'************************************************
'************************************************
%>
