Avatar billede foreignhelp Nybegynder
18. marts 2003 - 20:39 Der er 3 kommentarer og
1 løsning

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>&nbsp;</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>&nbsp;"
                  Details = Details & "<a href='Delete.asp?d=" & dDay & "'>" & DeleteImage & "</a>&nbsp;" 
                            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 "&nbsp;&nbsp;<a href='" & request.servervariables("SCRIPT_NAME") & "?month=1&year=" & year(now) & "'>Jan</a>&nbsp;&nbsp;" & vbCrlf
  Response.Write "&nbsp;&nbsp;<a href='" & request.servervariables("SCRIPT_NAME") & "?month=2&year=" & year(now) & "'>Feb</a>&nbsp;&nbsp;" & vbCrlf
  Response.Write "&nbsp;&nbsp;<a href='" & request.servervariables("SCRIPT_NAME") & "?month=3&year=" & year(now) & "'>Mar</a>&nbsp;&nbsp;" & vbCrlf
  Response.Write "&nbsp;&nbsp;<a href='" & request.servervariables("SCRIPT_NAME") & "?month=4&year=" & year(now) & "'>Apr</a>&nbsp;&nbsp;" & vbCrlf
  Response.Write "&nbsp;&nbsp;<a href='" & request.servervariables("SCRIPT_NAME") & "?month=5&year=" & year(now) & "'>May</a>&nbsp;&nbsp;" & vbCrlf
  Response.Write "&nbsp;&nbsp;<a href='" & request.servervariables("SCRIPT_NAME") & "?month=6&year=" & year(now) & "'>Jun</a>&nbsp;&nbsp;" & vbCrlf
  Response.Write "<BR>"
  Response.Write "&nbsp;&nbsp;<a href='" & request.servervariables("SCRIPT_NAME") & "?month=7&year=" & year(now) & "'>Jul</a>&nbsp;&nbsp;" & vbCrlf
  Response.Write "&nbsp;&nbsp;<a href='" & request.servervariables("SCRIPT_NAME") & "?month=8&year=" & year(now) & "'>Aug</a>&nbsp;&nbsp;" & vbCrlf
  Response.Write "&nbsp;&nbsp;<a href='" & request.servervariables("SCRIPT_NAME") & "?month=9&year=" & year(now) & "'>Sep</a>&nbsp;&nbsp;" & vbCrlf
  Response.Write "&nbsp;&nbsp;<a href='" & request.servervariables("SCRIPT_NAME") & "?month=10&year=" & year(now) & "'>Oct</a>&nbsp;&nbsp;" & vbCrlf
  Response.Write "&nbsp;&nbsp;<a href='" & request.servervariables("SCRIPT_NAME") & "?month=11&year=" & year(now) & "'>Nov</a>&nbsp;&nbsp;" & vbCrlf
  Response.Write "&nbsp;&nbsp;<a href='" & request.servervariables("SCRIPT_NAME") & "?month=12&year=" & year(now) & "'>Dec</a>&nbsp;&nbsp;" & 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>&nbsp;</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
'************************************************
'************************************************
%>
Avatar billede hossein Nybegynder
18. marts 2003 - 20:44 #1
har du prøvet at lægge dette på toppen af din side:
<%session.LCID = 1030%>
Avatar billede foreignhelp Nybegynder
18. marts 2003 - 20:46 #2
Nej Hossein. Hvad betyder det?
Avatar billede hossein Nybegynder
18. marts 2003 - 20:47 #3
den formatere til dansk format.
Avatar billede foreignhelp Nybegynder
18. marts 2003 - 20:48 #4
Det var det!  Super, pyha :-)
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester