note 117250 added to locale.getprimarylanguage
| From: | Mahn | Date: | Sat, 09 May 2015 23:48:42 +0000 |
| Subject: | note 117250 added to locale.getprimarylanguage | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-202484@lists.php.net to get a copy of this message | ||
The behaviour when a falsy value is passed as the $locale is undocumented, but it appears that it
returns the primary language of the default system language. In my case:
Locale::getPrimaryLanguage(null);
Returns 'en'. So make sure to test $locale before passing it to the method.
----
Server IP: 87.124.126.49
Probable Submitter: 46.5.130.76
----
Manual Page -- http://php.net/manual/en/locale.getprimarylanguage.php
Edit -- https://master.php.net/note/edit/117250
Del: integrated -- https://master.php.net/note/delete/117250/integrated
Del: useless -- https://master.php.net/note/delete/117250/useless
Del: bad code -- https://master.php.net/note/delete/117250/bad+code
Del: spam -- https://master.php.net/note/delete/117250/spam
Del: non-english -- https://master.php.net/note/delete/117250/non-english
Del: in docs -- https://master.php.net/note/delete/117250/in+docs
Del: other reasons-- https://master.php.net/note/delete/117250
Reject -- https://master.php.net/note/reject/117250
Search -- https://master.php.net/manage/user-notes.php