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.
--
PHP Unicode & I18N Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php