cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Engelhart <mengelh...@earthtrip.com>
Subject Re: R:XMLResourceBundle
Date Thu, 22 Jun 2000 15:10:59 GMT
on 6/22/00 5:35 AM, Interesse Michelangelo at M.Interesse@netsiel.it wrote:

> Well done Mike ;-)
> 
> I was thinking about a similar solution, tough one can argue why/where/when
> may be convenient to use IT instead of the classic .properties solution
> that, at least in terms of performances, should behave much better ?
> 
> Are you going toward a new internationalization framework ?
> 
> Thanks for your work !
Thanks..   I'm just trying to get feedback on where to go with this.  Any
comments are appreciated.  I have just finished adding the feature of
ResourceBundle's that allows fallback if you try and access a ResourceBundle
that doesn't exist.  For example if you only have one .xml file called
resource_fr.xml in your path and you make a call to
XMLResourceBundleFactory.getBundle("resource", new Locale("fr", "ca",
"Win95")) but it's not there, the getBundle() method continually tries to
build an XMLResourceBundle by first removing the Locale variant, then
country code and finally language code so that you can just load in even a
file called "resource.xml" as the default bundle.  This is how the
java.uti.ResourceBundle behaves.  Of course if there is no file at all, it
throws a MissingResourceException.

Also, I since the XMLResourceBundle already is a structured document (i.e.,
XML), I thought there was no need to have inheritance built into the
XMLResourceBundle class.  Is this assumption correct? I'm still not sure but
mostly because I haven't come up with an example.  With regular
java.util.ResourceBundle's you can have a parent bundle hold general things
 and have more specific bundle's handle more specific items.

thoughts??

Mike


Mime
View raw message