Edit report at http://bugs.php.net/bug.php?id=54540&edit=1

 ID:                 54540
 Updated by:         s...@php.net
 Reported by:        david dot zuelke at bitextender dot com
 Summary:            Allow loading of arbitrary resource bundles when
                     fallback is disabled.
-Status:             Assigned
+Status:             Closed
 Type:               Feature/Change Request
 Package:            *Languages/Translation
 Operating System:   Mac OS X 10.6.7
 PHP Version:        5.3.6
 Assigned To:        stas
 Block user comment: N
 Private report:     N

 New Comment:

Applied, thanks


Previous Comments:
------------------------------------------------------------------------
[2011-04-17 23:56:28] s...@php.net

Automatic comment from SVN on behalf of stas
Revision: http://svn.php.net/viewvc/?view=revision&revision=310293
Log: implement FR #54540 - Allow loading of arbitrary resource bundles
when fallback is disabled

------------------------------------------------------------------------
[2011-04-15 14:40:52] johan...@php.net

Stas, please check this. Thanks!

------------------------------------------------------------------------
[2011-04-15 14:38:07] david dot zuelke at bitextender dot com

Description:
------------
ResourceBundle::__construct() uses ures_open(), which performs validity
checks on 

the given locale identifier. That's reasonable, as the fallback
functionality only 

works with proper locale IDs (example: you pass "de_DE", but no such
bundle exist, 

it will then use the bundle "de" if that exists).



With the fallback flag off (third ctor argument), ures_open is still
used. This 

won't allow loading of data in invalid identifiers, such as some of
ICU's built-in 

data (e.g. "supplementalData").



Attached is a patch that uses ures_openDirect() if the fallback flag is
off. Tests 

are also included.



------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=54540&edit=1

Reply via email to