note 116317 added to function.setlocale
| From: | TiMESPLiNTER | Date: | Thu, 11 Dec 2014 15:30:22 +0000 |
| Subject: | note 116317 added to function.setlocale | ||
| Groups: | php.notes php.notes | ||
| Request: | Send a blank email to php-notes+get-201114@lists.php.net to get a copy of this message | ||
Please note that setlocale(LC_ALL, 0) returns the same information but in different format on
different operating systems if you have set different locales for different categories.
<?php
setlocale(LC_ALL, 'en_US');
setlocale(LC_TIME, 'de_DE');
?>
So on OSX (Darwin) it returns:
en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/de_DE.UTF-8/en_US.UTF-8
and on Linux it returns (without linebreaks):
LC_CTYPE=en_US.UTF-8;
LC_NUMERIC=en_US.UTF-8;LC_TIME=de_CH.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;
LC_PAPER=en_US.UTF-8;LC_NAME=en_US.UTF-8;LC_ADDRESS=en_US.UTF-8;LC_TELEPHONE=en_US.UTF-8;
LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=en_US.UTF-8
----
Server IP: 72.52.91.14
Probable Submitter: 80.74.144.144
----
Manual Page -- http://php.net/manual/en/function.setlocale.php
Edit -- https://master.php.net/note/edit/116317
Del: integrated -- https://master.php.net/note/delete/116317/integrated
Del: useless -- https://master.php.net/note/delete/116317/useless
Del: bad code -- https://master.php.net/note/delete/116317/bad+code
Del: spam -- https://master.php.net/note/delete/116317/spam
Del: non-english -- https://master.php.net/note/delete/116317/non-english
Del: in docs -- https://master.php.net/note/delete/116317/in+docs
Del: other reasons-- https://master.php.net/note/delete/116317
Reject -- https://master.php.net/note/reject/116317
Search -- https://master.php.net/manage/user-notes.php