I have been working on exactly this kind of issue in my library and have code for both internationalization and logging, including a tool class that helps doing both in one step - logging internationalized strings. All my Logging + i18n code is based in Apache code (mostly Avalon + Velocity for initialization + a bit of Commons). I just grabbed the best stuff I found around Apache-Jakarta and placed it together. I am in the process of adding the kind of "easy" initialization found in Velocity for all the loggers supported (Log4J, LogKit and the Jdk14 thing). I will try to contribute this back to Jakarta (maybe Commons) in the next couple of days. I can post a copy here, so that you can take a look at the thing. Have fun, Paulo Gaspar http://www.krankikom.de http://www.ruhronline.de > -----Original Message----- > From: Doug Cutting [mailto:DCutting@grandcentral.com] > Sent: Wednesday, December 05, 2001 7:20 PM > To: 'Lucene Developers List' > Cc: klicnik@ca.ibm.com > Subject: RE: Separating translatable strings > > > > From: Otis Gospodnetic [mailto:otis_gospodnetic@yahoo.com] > > > > I thought this was a nice idea. Is this something others > > would like to see? > > Sure, if it doesn't complicate the code too much. > > I imagine it would change things like: > throw new IOException(bar + " is not bazzed: " + foo); > to: > throw new IOException(ErrorStrings.format("not.bazzed", new > Object[]{bar, > foo}); > or better yet: > throw new LuceneException("not.bazzed", new Object[]{bar, foo}); > > It would be nice to see a proposal that details the new exception API. > > In the ideal world, different exception classes would be used for > different > error conditions. User interfaces could then catch specific > exceptions and > decide what to do. Unfortunately Lucene's use of exceptions is > not so good, > and applications end up just displaying error strings directly to > users. So > translating these error strings is probably useful. > > Doug > > -- > To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: