On Feb 6, 2008 11:24 AM, Martin Desruisseaux <[EMAIL PROTECTED]> wrote: > Simone Giannecchini a écrit : > > The class Errors hardcodes the Class object it uses to load the > > resource bundle hence from wherever you call it it look into > > org.geotools.resources.i18n subdir. Am I right? > > Yes. > > > My goal is to be able to load Errors from wherever I am... > > Yes it should work... > > Martin > Wait, I think the two statement above are contradicting themselves :-) or I am doing something wrong.
I have created the utf resource file in my dir which is called a.b.c.i18n, now from my code if I do System.out.println(Errors.format(ErrorKeys.TEST)); where ErrorKeys was defined by me in a.b.c.i18n, I get the error message which is instead located into the Errors file in org.geotools.resources.i18n. I did not dig much into your code yet but my feeling is that this happens because Errors in org.geotools.resources.i18n hardcodes the Class which is provided the ResourceBundle to the Errors class itself hence the files we get are always the error files for such package (centralized approach). Am I right? Thx, Simone. -- ------------------------------------------------------- Eng. Simone Giannecchini President /CEO GeoSolutions S.A.S. Via Carignoni 51 55041 Camaiore (LU) Italy phone: +39 0584983027 fax: +39 0584983027 mob: +39 333 8128928 http://www.geo-solutions.it ------------------------------------------------------- ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
