Hi everybody,
I would like to introduce the possibility to have internationalized Title and Abstract elements in SLD documents.
Luckily they are already defined as InternationalString in Geotools SLD code, but the current implementation uses SimpleInternationalString, that doesn’t allow a different value based on a Locale.
What I would like to do is to use a modified version of ResourceInternationalString instead of SimpleInternationalString to allow for properties lookup in the given locale, but falling back nicely to the current value if no translation is available.
To have internationalized title / abstract when needed a user should:
- use a key instead of the real value in SLD for a title / abstract (the key could be any valid value for a properties file key)
- create a property file named SLD_.properties in the org.geotools.styling package on a path in the classpath with key=value rows for the given locale
- repeat the above for any locale needed
The final purpose of this is to introduce internationalized rule titles in GeoServer WMS GetLegendGraphic rendering, through a new LEGEND_OPTIONS value named locale.
Any opinions on this?
Thanks.
Mauro Bartolomeoli
–
==
GeoServer training in Milan, 6th & 7th June 2013! Visit
http://geoserver.geo-solutions.it for more information.
Dott. Mauro Bartolomeoli
@mauro_bart
Senior Software Engineer
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
http://www.geo-solutions.it
http://twitter.com/geosolutions_it