ID: 48574 Updated by: s...@php.net Reported By: a dot schilder at gmx dot de -Status: Assigned +Status: Closed Bug Type: I18N and L10N related Operating System: Windows XP PHP Version: 5.3.0RC3 Assigned To: stas New Comment:
This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2009-07-02 00:10:12] s...@php.net Docs are wrong, it should be: echo Locale::lookup($languages, 'en_US', false, 'en_UK'); But there's also a bug in lookup, will fix it. ------------------------------------------------------------------------ [2009-06-24 06:41:12] a dot schilder at gmx dot de Email changed ------------------------------------------------------------------------ [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