Re: [Geoserver-devel] [Geotools-devel] SLD and Internationalization

2013-06-10 Thread Mauro Bartolomeoli
> > This totally makes sense, thank you. > Hum... cpdetector is half a megabyte, a wee bit too large. > Yes, I know. > However, the xml declaration is just one line, and I believe that one can > be read before reading the actual content. > Actually, see this one, it seems a parser can read the e

Re: [Geoserver-devel] [Geotools-devel] SLD and Internationalization

2013-06-10 Thread Andrea Aime
On Mon, Jun 10, 2013 at 9:11 AM, Mauro Bartolomeoli < mauro.bartolome...@geo-solutions.it> wrote: > From my experience, it's not the parser duty to handle the encoding. This > is usually done building a Reader using this weird syntax: > > new InputStreamReader(, encoding) > > but this assumes you

Re: [Geoserver-devel] [Geotools-devel] SLD and Internationalization

2013-06-10 Thread Mauro Bartolomeoli
2013/6/9 Andrea Aime > On Sun, Jun 9, 2013 at 4:14 PM, Jody Garnett wrote: > >> Created a pull request for this: >> https://github.com/geotools/geotools/pull/202 >> >> Updated both gt-styling (in main) and gt-xsd-sld to support the new >> extension. >> >> Checked it over, looks good. I may of mis

Re: [Geoserver-devel] [Geotools-devel] SLD and Internationalization

2013-05-23 Thread Andrea Aime
On Thu, May 23, 2013 at 11:48 AM, Mauro Bartolomeoli < mauro.bartolome...@geo-solutions.it> wrote: > Hi all, > I think I can prepare a patch for this shortly using the last variant > proposed by Andrea (I did some testing patching the SLDParser and > everything seems to work well). > I would use t

Re: [Geoserver-devel] [Geotools-devel] SLD and Internationalization

2013-05-23 Thread Mauro Bartolomeoli
Hi all, I think I can prepare a patch for this shortly using the last variant proposed by Andrea (I did some testing patching the SLDParser and everything seems to work well). I would use the "free text" (not included in a value tag) as the default value if no locale is specified. So, something li

Re: [Geoserver-devel] [Geotools-devel] SLD and Internationalization

2013-05-22 Thread Jody Garnett
Yeah I like that, more similar to the W3C approach for html documents. Only wrinkle would be to define the document default lang, and use for the alternatives. -- Jody Garnett On Wednesday, 22 May 2013 at 8:35 AM, Andrea Aime wrote: > Thinking about it, I would like to propose a further

Re: [Geoserver-devel] [Geotools-devel] SLD and Internationalization

2013-05-22 Thread Andrea Aime
Thinking about it, I would like to propose a further variant that is possibly cleaner on the user's eyes, and better to parse. Just like we extended the content of some SLD elements already (think geometry, not limited anymore to a property name) we could allow mixed content in Title and Abstract

Re: [Geoserver-devel] [Geotools-devel] SLD and Internationalization

2013-05-22 Thread Mauro Bartolomeoli
2013/5/21 Andrea Aime > On Tue, May 21, 2013 at 6:42 PM, carlo cancellieri < > carlo.cancelli...@geo-solutions.it> wrote: > >> Mauro, >> >> Can you explain me using an example how you would use the VendorOption >>> to specify localized versions of a title or abstract? >>> >> >> Well I was thinki

Re: [Geoserver-devel] [Geotools-devel] SLD and Internationalization

2013-05-21 Thread Andrea Aime
On Tue, May 21, 2013 at 6:42 PM, carlo cancellieri < carlo.cancelli...@geo-solutions.it> wrote: > Mauro, > > Can you explain me using an example how you would use the VendorOption to >> specify localized versions of a title or abstract? >> > > Well I was thinking to standardize the keys using the

Re: [Geoserver-devel] [Geotools-devel] SLD and Internationalization

2013-05-21 Thread carlo cancellieri
Mauro, Can you explain me using an example how you would use the VendorOption to > specify localized versions of a title or abstract? > Well I was thinking to standardize the keys using the I18n standard prefix plus a fixed Keyword, something like: Il titolo The title Questo e' un esempio This i

Re: [Geoserver-devel] [Geotools-devel] SLD and Internationalization

2013-05-21 Thread Mauro Bartolomeoli
2013/5/21 carlo cancellieri > Mauro, > > Yes, it could be, but at the Geotools level there is no knowlegde of the >> geoserver_data_dir. So we should introduce this eventually at the GeoServer >> level. >> I should look at how to make this pluggable and allow various sources for >> internationali

Re: [Geoserver-devel] [Geotools-devel] SLD and Internationalization

2013-05-21 Thread Andrea Aime
On Tue, May 21, 2013 at 5:47 PM, Jody Garnett wrote: > You should also be able to use XML language support to list the different > translations right in the SLD file itself (and then parse the whole title > out as an international string ). > Eh, I'm afraid not: A UserStyl

Re: [Geoserver-devel] [Geotools-devel] SLD and Internationalization

2013-05-21 Thread Jody Garnett
You should also be able to use XML language support to list the different translations right in the SLD file itself (and then parse the whole title out as an international string ). -- Jody Garnett On 21/05/2013, at 7:37 AM, carlo cancellieri wrote: > Mauro, > >> Yes, it could be, but at t

Re: [Geoserver-devel] [Geotools-devel] SLD and Internationalization

2013-05-21 Thread carlo cancellieri
Mauro, Yes, it could be, but at the Geotools level there is no knowlegde of the > geoserver_data_dir. So we should introduce this eventually at the GeoServer > level. > I should look at how to make this pluggable and allow various sources for > internationalization resource bundles. > Right. Hav

Re: [Geoserver-devel] [Geotools-devel] SLD and Internationalization

2013-05-21 Thread Mauro Bartolomeoli
2013/5/21 carlo cancellieri > Mauro, > this is a very interesting proposal. > > 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) >> - crea

Re: [Geoserver-devel] [Geotools-devel] SLD and Internationalization

2013-05-21 Thread carlo cancellieri
Mauro, this is a very interesting proposal. 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