ceciliamtz
asked on
Trouble with setlocale("LC_TIME", "es_ES");
Hi
I need to show a date field in my data base in spanish. I have ste the code
<?php
setlocale(LC_TIME, 'es_ES');
?>
on my page.
The code to show the date field is:
<?php echo strftime("%A, %e %b %Y", strtotime($row_tb_dates['f echa'])); ?>
I get Wednesday, 22 Dec 2004 instead of Miércoles, 22 de Dic 2004
Am I missing something?
Thanks
Cecilia
I need to show a date field in my data base in spanish. I have ste the code
<?php
setlocale(LC_TIME, 'es_ES');
?>
on my page.
The code to show the date field is:
<?php echo strftime("%A, %e %b %Y", strtotime($row_tb_dates['f
I get Wednesday, 22 Dec 2004 instead of Miércoles, 22 de Dic 2004
Am I missing something?
Thanks
Cecilia
ASKER
this is the output:
Preferred locale on this system is ''
Preferred locale on this system is ''
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This code did the trick on my mychine
setlocale(LC_TIME,'Spanish ');
setlocale(LC_TIME,'Spanish
ASKER
none of the values worked for me
could it be something at the server? maybe some modification to php.ini?
could it be something at the server? maybe some modification to php.ini?
Try this one
setlocale(LC_TIME,'Spanish _Spain');
or read official documentation http://si.php.net/manual/en/function.setlocale.php
cheers
setlocale(LC_TIME,'Spanish
or read official documentation http://si.php.net/manual/en/function.setlocale.php
cheers
ASKER
got it working with
setlocale(LC_TIME, 'es_ES.ISO8859-1');
I don't know why the previous time it didn't work
Thanks a lot!!
Cecilia
setlocale(LC_TIME, 'es_ES.ISO8859-1');
I don't know why the previous time it didn't work
Thanks a lot!!
Cecilia
$loc_es = setlocale (LC_ALL, 'es_ES', 'es');
echo "Preferred locale on this system is '$loc_es'";
cheers