Originariamente inviato da epescol
Questo lo script completo:
<?php if ($auth != "ko" and $lang == "IT") {echo "".setlocale(LC_ALL,'it'); echo(strftime('%A, %d %B %Y - ore %X'));."";}
elseif ($auth != "ko" and $lang == "DE") {echo "".setlocale(LC_ALL,'deu'); echo(strftime('%A, %d %B %Y - ore %X'));."";}
elseif ($auth != "ko" and $lang == "EN") {echo "".setlocale(LC_ALL,'en'); echo(strftime('%A, %d %B %Y - ore %X'));."";}
?>
codice:
<?php
$temp=array("IT"=>"it","DE"=>"deu","EN"=>"en");
if ($auth != "ko" && array_key_exists($lang,$temp))
setlocale(LC_ALL,$temp[$lang]);
echo strftime('%A, %d %B %Y - ore %X');
?>