note 41643 deleted from function.setlocale by tomsommer
| From: | tomsommer@php.net | Date: | Sat, 17 Apr 2004 23:05:13 +0000 |
| Subject: | note 41643 deleted from function.setlocale by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-68272@lists.php.net to get a copy of this message | ||
Note Submitter: SimoAmi (simoami@hotmail.com)
----
The following code will allow you to apply your locale settings regardless of the OS platform used.
<?php
$locale = array('fr','fr_FR','french'); // use as many entries as you
want. The last valid one would apply.
// Localizing time
while(list(,$temp_lang_code) = each($locale) ) {
setlocale (LC_TIME,$temp_lang_code);
}
// let's test the results
echo ucwords(strftime ("%A, %e %B %d, %Y"));
?>