[prev in list] [next in list] [prev in thread] [next in thread]
List: php-i18n
Subject: Re: [PHP-I18N] intl / resourcebundle: Invitation to comment
From: Joel Sahleen <jsahleen () adobe ! com>
Date: 2010-08-16 20:46:04
Message-ID: 29449192.post () talk ! nabble ! com
[Download RAW message or body]
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic