2008-06-09, 05:17 PM
hello, I can not find where change to read the names of days of the week and months in Italian, rather than English as currently in post and the panel welcome appear in English as a screen attached.
/**
* Replacement of the gmdate() function for french version.
*
* @param string A date format according to PHP's date structure.
* @param int The unix timestamp the date should be generated for.
* @return string The formatted GMT timestamp "localized".
*
* Remplacement de la fonction gmdate() pour version française
*
* @param chaîne Un format de date conforme à la structure date PHP
* @param int Le timestamp Unix pour lequel il faut générer une date
* @return Le timestamp GMT formaté "localisé" *
*/
function my_gmdate ($format, $stamp)
{
// Changes the localization information
// Modifie les informations de localisation
setlocale(LC_TIME, 'Italiano (IT)');
// Replaces the format params used for date() fonction with those used by gmstrftime() function
// witch returns formatted date according to the local configuration
// Remplace les paramètres de format utilisés par la fonction date() par ceux utilisés par la fonction gmstrftime()
// qui retourne la date formatée en fonction de la configuration locale.
// Ex. Replaces "M Y" with "%b %Y" for gmstrftime() (please check it, surely it remains errors or missing params)
// Ex. Remplace "M Y" par "%b %Y" pour gmstrftime() (merci de vérifier, il doit rester quelques erreurs ou omissions de paramètres)
$format=str_replace(
array ("D", "l", "M", "F", "d", "j", "y", "o", "M", "H", "h", "z", "m", "i", "a", "s", "N", "W", "w", "y", "Y", "e"),
array("%a", "%A", "%b", "%B", "%d", "%e", "%g", "%G", "%h", "%H", "%I", "%j", "%m", "%M", "%p", "%u", "%W", "%w", "%u", "%y", "%Y", "%z"), $format);
// returns the localized formated string
// retourne la chaîne formatée "française"
return gmstrftime($format, $stamp);
}
(2008-07-04, 12:54 AM)DennisTT Wrote: [ -> ]Have you tried this:
setlocale(LC_TIME, 'IT');