Visualizzazione dei risultati da 1 a 3 su 3

Discussione: calendario

  1. #1
    Utente di HTML.it
    Registrato dal
    Sep 2007
    Messaggi
    135

    calendario

    come traduco i mesi di questo calendario in italiano?
    Codice PHP:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>PHP CSS Calendar Example</title> <link href="calendar.css" rel="stylesheet" type="text/css" /> </head>  <body> <h3>PHP CSS Calendar Example</h3> <table id="calendar" cellspacing="0" cellpadding="0" summary="This month's calendar"> <?php  $day = @$_GET["day"]; $month = @$_GET["month"]; $year = @$_GET["year"];  if ($month == ""){      $day date('d');     $month date('n');     $year date('Y'); } $firstOfMonthDateStamp mktime(125959$month1$year);  $daysInCurrentMonth date("t"$firstOfMonthDateStamp); $firstOfMonthDay date("d"$firstOfMonthDateStamp); $lastOfMonthDay date("w"strtotime(date("n",$firstOfMonthDateStamp)."/".$daysInCurrentMonth."/".date("Y",$firstOfMonthDateStamp))); $previousMonth getdate(strtotime('-1 month'$firstOfMonthDateStamp)); $nextMonth getdate(strtotime('+1 month'$firstOfMonthDateStamp)); ?> <caption>[url="calendar.php?day=<?php echo $day ?>&amp;month=<?php echo $previousMonth['mon'?>&amp;year=<?php echo $previousMonth['year'?>"])">&lt;&lt;[/url] <?php echo date("F"$firstOfMonthDateStamp?>  <?php echo date("Y",$firstOfMonthDateStamp?> [url="calendar.php?day=<?php echo $day ?>&amp;month=<?php echo $nextMonth['mon'?>&amp;year=<?php echo $nextMonth['year'?>"])">&gt;&gt;[/url]</caption>   <tr><th abbr="Sunday" title="Sunday">S</th><th abbr="Monday" title="Monday">M</th><th abbr="Tuesday" title="Tuesday">T</th><th abbr="Wednesday" title="Wednesday">W</th><th abbr="Thursday" title="Thursday">T</th><th abbr="Friday" title="Friday">F</th><th abbr="Saturday" title="Saturday">S</th></tr> <tr> <?php //ASP/PHP WRITTEN BY BOB MCKAY, [url]WWW.FRESHMANGO.COM[/url] - USE AS YOU WISH BUT PLEASE LEAVE THIS IN PLACE //DESIGN, CSS AND XHTML ALL BY VEERLE, [url]HTTP://VEERLE.DUOH.COM[/url] $columnCounter = 0; //FOR fillLeadingEmptyDays = 1 TO ($firstOfMonthDay - 1) for ($fillLeadingEmptyDays=0; $fillLeadingEmptyDays <= ($firstOfMonthDay - 1); $fillLeadingEmptyDays+=1) {      $columnCounter = $columnCounter + 1;     echo "<td></td>"; } for ($enterDays=1; $enterDays <= $daysInCurrentMonth; $enterDays+=1) {      $columnCounter = $columnCounter + 1;     echo "<td><a ";     if ($enterDays == $day) { echo " class = \"today\""; }     $dayLinkDestination = "#";     echo " href=\"".$dayLinkDestination."\">".$enterDays."</a></td>";     if ( $columnCounter == 7 ) {         echo "</tr><tr>";         $columnCounter = 0;     } } for ($fillEmptyDays=($columnCounter + 1); $fillEmptyDays <= 7; $fillEmptyDays+=1) {      if ($columnCounter ==0) {         break;     }     echo "<td></td>";  } ?></tr> </table> </body> </html>

  2. #2
    Utente di HTML.it
    Registrato dal
    Oct 2008
    Messaggi
    270
    devi farti una piccola funzioncina che dato il numero del mese ti tira fuori il nome in italiano

    una cosa del genere
    codice:
    if($mese=='1') return 'gennaio';
    else if ($mese=='2') return 'febbraio';
    ......

  3. #3
    Utente di HTML.it
    Registrato dal
    Sep 2007
    Messaggi
    135
    e in ke parte dello script lo dovrei inserire???

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.