Re: intl / resourcebundle: Invitation to comment
| From: | Joel Sahleen | Date: | Mon, 16 Aug 2010 20:46:04 +0000 |
| Subject: | Re: intl / resourcebundle: Invitation to comment | ||
| References: | 1 | Groups: | php.i18n |
| Request: | Send a blank email to php-i18n+get-1411@lists.php.net to get a copy of this message | ||
I am using the Intl ResourceBundle class on a large-scale
internationalization project, and I noticed that when you create a bundle
and then use iteration (i.e., foreach) to loop through the entries, there is
no fallback if entries are missing.
I have one bundle for en_US that is empty, and have put all en_US strings in
root, so that the system will always fall back to US English. If I use the
bundle's get Method the fallback works fine, but the following code returns
null:
$bundle = new ResourceBundle('en_US', 'path/to/bundle/dir', TRUE);
foreach($bundle as $token => $value){
echo $bundle[$token] . "\n"; // always returns null if bundle is empty;
does not fallback to root
}
I'm not sure if this is a bug or how the class is designed to work, but I
thought I should bring it up.
Thanks.
Joel Sahleen
Software Engineer
Adobe Systems, Inc.
--
View this message in context: http://old.nabble.com/intl---resourcebundle%3A-Invitation-to-comment-tp26896020p29449192.html
Sent from the Php - Internationalization (i18n) mailing list archive at Nabble.com.