php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #58256 composeLocale() "variant" and "private" options are done the wrong way
Submitted: 2008-06-30 12:25 UTC Modified: 2008-07-23 15:45 UTC
From: david dot zuelke at bitextender dot com Assigned:
Status: Closed Package: intl (PECL)
PHP Version: Irrelevant OS: irrelevant
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: david dot zuelke at bitextender dot com
New email:
PHP Version: OS:

 

 [2008-06-30 12:25 UTC] david dot zuelke at bitextender dot com
Description:
------------
We agreed in a mailing list discussion that the example at 
http://docs.php.net/manual/en/locale.composelocale.php is 
very unreasonable:

$arr = array(
 'language' => 'en',
 'script'   => 'Hans',
 'region'   => 'CN',
 'variant2' => 'rozaj',
 'variant1' => 'nedis',
 'private1' => 'prv1',
 'private2' => 'prv2'
);
echo Locale::composeLocale($arr);

I may use private0, private1, ... private14?

How about

$arr = array(
 'language' => 'en',
 'script'   => 'Hans',
 'region'   => 'CN',
 'variants' => array(
   'rozaj',
   'nedis',
 ),
 'privates' => array(
   'prv1',
   'prv2',
 ),
);
echo Locale::composeLocale($arr);

Stas' reply:
"Nice idea, please add a feature request. Maybe even better 
would be to allow "private"/"variant" to be both string and 
array (now it can be only string)."


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-23 15:45 UTC] stas at zend dot com
Added this syntax:

$arr = array(
 'language' => 'en',
 'script'   => 'Hans',
 'region'   => 'CN',
 'variant' => array(
   'rozaj',
   'nedis',
 ),
 'private' => array(
   'prv1',
   'prv2',
 ),
);
 [2008-07-23 15:45 UTC] stas at zend dot com
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.


 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Oct 30 17:01:24 2020 UTC