[Geoserver-devel] Internationalized Labels in GetLegendGraphic

Hi everybody,
I would like to add support for internationalized labels in GetLegendGraphic output using the work done for GEOT-4477 and GEOT-4484.
To trigger a specific locale a new input to GetLegendGraphic will be needed (named lang, or locale, which one do you like best?) Two options here:

  • adding a new LEGEND_OPTIONS parameter
  • adding a new parameter directly to the request

Suggestions?

Thanks
Mauro

==
Our support, Your Success! Visit http://opensdi.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


I prefer legend options :wink:


Jody Garnett

On Friday, 14 June 2013 at 7:30 PM, Mauro Bartolomeoli wrote:

Hi everybody,
I would like to add support for internationalized labels in GetLegendGraphic output using the work done for GEOT-4477 and GEOT-4484.
To trigger a specific locale a new input to GetLegendGraphic will be needed (named lang, or locale, which one do you like best?) Two options here:

  • adding a new LEGEND_OPTIONS parameter
  • adding a new parameter directly to the request

Suggestions?

Thanks
Mauro

==
Our support, Your Success! Visit http://opensdi.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



This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev


Geoserver-devel mailing list
Geoserver-devel@anonymised.coms.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

On Fri, Jun 14, 2013 at 11:30 AM, Mauro Bartolomeoli <
mauro.bartolomeoli@anonymised.com> wrote:

Hi everybody,
I would like to add support for internationalized labels in
GetLegendGraphic output using the work done for GEOT-4477 and GEOT-4484.
To trigger a specific locale a new input to GetLegendGraphic will be
needed (named lang, or locale, which one do you like best?) Two options
here:
- adding a new LEGEND_OPTIONS parameter
- adding a new parameter directly to the request

INSPIRE provides guidance in this respect, any request that can be affected
by internationalization must support
a direct request parameter specifying the language, from the spec:

--------
The name of this parameter shall be “LANGUAGE”. The parameter values are
based on ISO 639-2/B alpha 3 codes as used in [INS MDTG]
--------

For example:
http://inspire.network.service.example/service?SERVICE=[...]&VERSION=[...]&LANGUAGE=eng

This is however for the capabilities request. For other operations the
guidance says:

------------------------
For further language support for other operation it is
recommended to replace the operation-online-resources in each language
specific GetCapabilitiesResponse by a specific operation-online-resource
for that language. To support the additional
operation-online-resources the service shall listen at the language
specific operation end-points to
distinguish for the requested languages.
------------------------

Which, imho, would be easily implemented if we allow the language to be a
KVP param in all requests,
so that code specifically interested in language issues can access it
either as part of the request object
(GetLegendGraphics case) or as a thread local.

Regardless of the specific solution I'd try to keep it uniform for all
services and methods, whilst legend_options
is specific to GetLegendGraphics.

Cheers
Andrea

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

Hi everybody, I created a pull request (https://github.com/geoserver/geoserver/pull/253) for this that used a language parameter in the request to choose a Locale for rule labels.

Thanks
Mauro Bartolomeoli

···

2013/6/14 Andrea Aime <andrea.aime@anonymised.com>

On Fri, Jun 14, 2013 at 11:30 AM, Mauro Bartolomeoli <mauro.bartolomeoli@anonymised.com> wrote:

==
Our support, Your Success! Visit http://opensdi.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


Hi everybody,
I would like to add support for internationalized labels in GetLegendGraphic output using the work done for GEOT-4477 and GEOT-4484.
To trigger a specific locale a new input to GetLegendGraphic will be needed (named lang, or locale, which one do you like best?) Two options here:

  • adding a new LEGEND_OPTIONS parameter
  • adding a new parameter directly to the request

INSPIRE provides guidance in this respect, any request that can be affected by internationalization must support
a direct request parameter specifying the language, from the spec:


The name of this parameter shall be “LANGUAGE”. The parameter values are
based on ISO 639-2/B alpha 3 codes as used in [INS MDTG]

For example:

http://inspire.network.service.example/service?SERVICE=[…]&VERSION=[…]&LANGUAGE=eng

This is however for the capabilities request. For other operations the guidance says:


For further language support for other operation it is
recommended to replace the operation-online-resources in each language specific GetCapabilitiesResponse by a specific operation-online-resource for that language. To support the additional
operation-online-resources the service shall listen at the language specific operation end-points to
distinguish for the requested languages.


Which, imho, would be easily implemented if we allow the language to be a KVP param in all requests,
so that code specifically interested in language issues can access it either as part of the request object
(GetLegendGraphics case) or as a thread local.

Regardless of the specific solution I’d try to keep it uniform for all services and methods, whilst legend_options
is specific to GetLegendGraphics.

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272

mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it