Doc #53995 [Com]: resourcebundle_locales wait a string
| From: | franssen dot roland at gmail dot com | Date: | Mon, 13 Jun 2011 17:06:17 +0000 |
| Subject: | Doc #53995 [Com]: resourcebundle_locales wait a string | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-6731@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=53995&edit=1
ID: 53995
Comment by: franssen dot roland at gmail dot com
Reported by: jinmoku at hotmail dot com
Summary: resourcebundle_locales wait a string
Status: Open
Type: Documentation Problem
Package: I18N and L10N related
PHP Version: 5.3.5
Block user comment: N
Private report: N
New Comment:
The argument must be the bundle name (e.g. "/usr/data/resources").
I agree the docs are unclear on this.
Previous Comments:
------------------------------------------------------------------------
[2011-02-11 14:57:54] jinmoku at hotmail dot com
sorry
Actual result:
--------------
Warning: resourcebundle_locales() expects parameter 1 to be string, object given in
C:\www\test\index.php on line 6
Warning: resourcebundle_locales(): resourcebundle_locales: unable to parse input params in
C:\www\test\index.php on line 6
Warning: join(): Invalid arguments passed in C:\www\test\index.php on line 6
Warning: ResourceBundle::getLocales() expects exactly 1 parameter, 0 given in C:\www\test\index.php
on line 9
Warning: ResourceBundle::getLocales(): resourcebundle_locales: unable to parse input params in
C:\www\test\index.php on line 9
Warning: join(): Invalid arguments passed in C:\www\test\index.php on line 9
------------------------------------------------------------------------
[2011-02-11 14:55:30] jinmoku at hotmail dot com
Description:
------------
doc : http://fr.php.net/manual/en/resourcebundle.locales.php
Object oriented style
array ResourceBundle::getLocales ( void )
Procedural style
array resourcebundle_locales ( ResourceBundle $r )
-- CORRECT TEST SCRIPT --
<?php
$bundle = realpath('./ressource');
$r = resourcebundle_locales($bundle);
echo join("\n", $r);
$r = ResourceBundle::getLocales($bundle);
echo join("\n", $r);
Test script:
---------------
<?php
$bundle = realpath('./ressource');
$r = resourcebundle_create( 'es', $bundle);
echo join("\n", resourcebundle_locales($r));
$r = new ResourceBundle( 'es', $bundle);
echo join("\n", $r->getLocales());
Expected result:
----------------
es
rootes
root
Actual result:
--------------
<?php
$bundle = realpath('./ressource');
$r = resourcebundle_create( 'es', $bundle);
echo join("\n", resourcebundle_locales($r));
$r = new ResourceBundle( 'es', $bundle);
echo join("\n", $r->getLocales());
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=53995&edit=1