note 62115 added to function.setlocale
| From: | bruno dot cenou at revues dot org | Date: | Mon, 20 Feb 2006 14:31:51 +0000 |
| Subject: | note 62115 added to function.setlocale | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-104068@lists.php.net to get a copy of this message | ||
A little function to test available locales on a sytem :
<?php
function list_system_locales(){
ob_start();
system('locale -a');
$str = ob_get_contents();
ob_end_clean();
return split("\\n", trim($str));
}
$locale = "fr_FR.UTF8";
$locales = list_system_locales();
if(in_array($locale, $locales)){
echo "yes yes yes....";
}else{
echo "no no no.......";
}
?>
----
Server IP: 216.194.113.175
Probable Submitter: 139.124.176.171
----
Manual Page -- http://www.php.net/manual/en/function.setlocale.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+62115
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+62115&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+62115&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+62115&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+62115&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+62115&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+62115&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+62115&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+62115&report=yes
Search -- http://master.php.net/manage/user-notes.php