note 117246 added to locale.lookup

From: Date: Fri, 08 May 2015 22:59:10 +0000
Subject: note 117246 added to locale.lookup
Groups: php.notes 
Request: Send a blank email to php-notes+get-202479@lists.php.net to get a copy of this message
Note that this method does not understand "similar" languages, so the following: Locale::lookup(["en-US"], "en-GB", false); Or: Locale::lookup(["es-ES"], "es-CO", false); Does not work as you would expect (empty result). To get a match in those cases you will have to use two letter language codes instead: Locale::lookup(["en"], "en-GB", false); Or: Locale::lookup(["es"], "es-CO", false); These do return 'en' and 'es' respectively. ---- Server IP: 87.124.126.49 Probable Submitter: 46.5.130.76 ---- Manual Page -- http://php.net/manual/en/locale.lookup.php Edit -- https://master.php.net/note/edit/117246 Del: integrated -- https://master.php.net/note/delete/117246/integrated Del: useless -- https://master.php.net/note/delete/117246/useless Del: bad code -- https://master.php.net/note/delete/117246/bad+code Del: spam -- https://master.php.net/note/delete/117246/spam Del: non-english -- https://master.php.net/note/delete/117246/non-english Del: in docs -- https://master.php.net/note/delete/117246/in+docs Del: other reasons-- https://master.php.net/note/delete/117246 Reject -- https://master.php.net/note/reject/117246 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#202479) next »