Simone Giannecchini a écrit :
> 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.
If you use Errors from org.geotools.resources.i18n, it is the intented
behavior... I didn't understood that you wanted your own resources. In such
case, you need to creates yours own Errors class in the same package than your
resources. Just copy the Errors class from org.geotools.resources.i18n to your
a.b.c.i18n package (it is very small) and edit.
You are right that org.geotools.resources.i18n takes a centralized approach. At
the begining of GeoTools 2, I was declaring resources on a module-by-module
basis. I centralized later when I realized that the module-by-module approach
leads to a very high level of redundancy - messages like "illegal argument"
occur again and again. In my experience, I found more effective to split on a
purpose basis (errors, loggings, vocabulary... we could add widgets, etc.) than
on a module basis.
Martin
-------------------------------------------------------------------------
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