You are here: [Windows + PHP5] Localizing date()? « PHP Programming Language « IT news, forums, messages
[Windows + PHP5] Localizing date()?

Posted by Gilles Ganault on 12/28/07 03:10

Hello

I'm trying to localize a small PHP application which uses
date() to display a date saved as Epoch in MySQL, but I can't get the
month to be displayed in French:

=========
//BAD setlocale(LC_ALL, 'fr_FR@euro', 'fr_FR', 'fra_fra');
//BAD setlocale(LC_ALL, 'fra_fra');
//BAD setlocale(LC_ALL, 'french');
//BAD setlocale(LC_ALL, 'fr_FR');
//BAD setlocale(LC_ALL, 'fr-FR');
//BAD setlocale(LC_ALL, 'fr');
//BAD too
setlocale(LC_ALL, 'French');

//27 December 2007 instead of
//27 décembre 2007
echo date('d F Y', '1198790064');
=========

I read the comments in www.php.net/date , and was wondering...

1. Why PHP5 seems to have a problem with locales, and

2. What would be the least complicated way to change this call to
date()?

Thank you.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация