#48574 [Opn->Asn]: Locale::lookup modifies matching tag

From: Date: Fri, 19 Jun 2009 21:48:14 +0000
Subject: #48574 [Opn->Asn]: Locale::lookup modifies matching tag
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-138527@lists.php.net to get a copy of this message
 ID:               48574
 Updated by:       jani@php.net
 Reported By:      a dot schilder at gmx dot net
-Status:           Open
+Status:           Assigned
 Bug Type:         I18N and L10N related
 Operating System: Windows XP
 PHP Version:      5.3.0RC3
 Assigned To:      stas


Previous Comments:
------------------------------------------------------------------------

[2009-06-16 19:23:07] a dot schilder at gmx dot net

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



Thread (1 message)

  • jani@php.net
  • Unknown Message
    • jani@php.net
« previous php.bugs (#138527) next »