Ciao a tutti.
Ho questo codice a cui devo aggiungere la variabile per la lingua tedesca.
Che funzionerebbe nel medesimo modo di quella italiana.
Basta che all' if ($lingua=="it") aggiungo OR ? così ?
Codice PHP:
if ($lingua=="it" or "de")
Ho provato ma no funziona, mi sballa la lingua inglese...
Codice PHP:
# se $sw_ora è 1 mette anche l'ora
# se $sw_trunk è 1 tronca le descrizioni di giorno e mese a tre caratteri
# $format identifica il tipo di formattazione richiesta;
# 1 --> weekday . " " . $giorno . " " . $nomemese . " " . $anno . "
# 2 --> weekday . " " . $nomemese . " " . $giorno . " - " . $anno . "
if ($sw_ora=="1") {
if ($lingua=="it"){
$fdata=$weekday1 . " " . $giorno . " " . $nomemese1 . " " . $anno . "
Ore: " . $ora . ":" . $minuti . ":" . $secondi;
} else {
switch ($format) {
case "1":
$fdata=$weekday1 . " " . $giorno . " " . $nomemese1 . " " . $anno . "
Ore: " . $ora . ":" . $minuti . ":" . $secondi;
break;
case "2":
$fdata=$weekday1 . " " . $nomemese1 . " " . $giorno . " - " . $anno . "
Time: " . $ora . ":" . $minuti . ":" . $secondi;
break;
}
}
} else {
if ($lingua=="it"){
$fdata=$weekday1 . " " . $giorno . " " . $nomemese1 . " " . $anno;
} else {
switch ($format) {
case "1":
$fdata=$weekday1 . " " . $giorno . " " . $nomemese1 . " " . $anno;
break;
case "2":
$fdata=$weekday1 . " " . $nomemese1 . " " . $giorno . " - " . $anno;
break;
}
}
}
return $fdata;
}