#48574 [Asn]: Locale::lookup modifies matching tag
| From: | a dot schilder at gmx dot de | Date: | Wed, 24 Jun 2009 06:41:12 +0000 |
| Subject: | #48574 [Asn]: Locale::lookup modifies matching tag | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-138747@lists.php.net to get a copy of this message | ||
ID: 48574
User updated by: a dot schilder at gmx dot de
-Reported By: a dot schilder at gmx dot net
+Reported By: a dot schilder at gmx dot de
Status: Assigned
Bug Type: I18N and L10N related
Operating System: Windows XP
PHP Version: 5.3.0RC3
Assigned To: stas
New Comment:
Email changed
Previous Comments:
------------------------------------------------------------------------
[2009-06-16 19:23:07] a dot schilder at gmx dot de
Description:
------------
The documentation says that the return value of Locale::lookup is "The
closest matching language tag or default value.", but the matching tag
is modified.
The result of the example below doesn't match the searched (en_US) nor
the matched (en-us) tag, but is totally different (en_us).
Reproduce code:
---------------
<?php
$languages = array("en", "en-us");
echo Locale::lookup($languages, 'en_US', 'en_UK');
?>
Expected result:
----------------
en-us
Actual result:
--------------
en_us
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48574&edit=1