[Geoserver-users] Questions about GetLegendGraphic

Hi,

I need a internationalized labels in the ColorMapEntry for GetLegendGraphic request but documentation not describe how to do.

http://docs.geoserver.org/2.6.x/en/user/services/wms/get_legend_graphic/legendgraphic.html

Searching in the web, i have a pull request from Mauro and emails from geoserver-devel but i dont know what to do.

https://github.com/geoserver/geoserver/pull/253

For example:
Actually i have:

But i need:

Can you help me?

** Sorry for my bad english. =)

···

Att,
Arthur Zanona

Hi Arthur,

···

2015-04-07 20:47 GMT+02:00 Arthur F. Zanona <arthur@anonymised.com>:

https://github.com/geoserver/geoserver/pull/253

Unfortunately this pull request was about internazionalization of Rule labels, and did not apply to color map entries labels, so what you are asking for is not supported yet.

But i need:

I would use a different syntax, to avoid unneeded replication, since we need to differentiate only the label we could:

  • add additional attributes for localized labels (label_pt_BR or label_en), but this could be a bit “out of standard” and difficult to parse / serialize
  • use an expression like syntax to express multilanguage labels, leveraging cql functions. I was thinking of something like: label=“${Recode(env(‘lang’,‘en’),‘pt_BR’,‘baixo’,‘en’,‘low’)}”

With a recent pull request I added cql syntax support for several ColorMapEntry attributes, but unfortunately (again) label was not one of those, because it was a bit more difficult than for other attributes.

Regards,
Mauro

Mauro,

Thanks for the answers.

···

2015-04-08 4:14 GMT-03:00 Mauro Bartolomeoli <maurobartolomeoli@…84…>:

Hi Arthur,

2015-04-07 20:47 GMT+02:00 Arthur F. Zanona <arthur@anonymised.com>:

https://github.com/geoserver/geoserver/pull/253

Unfortunately this pull request was about internazionalization of Rule labels, and did not apply to color map entries labels, so what you are asking for is not supported yet.

But i need:

I would use a different syntax, to avoid unneeded replication, since we need to differentiate only the label we could:

  • add additional attributes for localized labels (label_pt_BR or label_en), but this could be a bit “out of standard” and difficult to parse / serialize
  • use an expression like syntax to express multilanguage labels, leveraging cql functions. I was thinking of something like: label=“${Recode(env(‘lang’,‘en’),‘pt_BR’,‘baixo’,‘en’,‘low’)}”

With a recent pull request I added cql syntax support for several ColorMapEntry attributes, but unfortunately (again) label was not one of those, because it was a bit more difficult than for other attributes.

Regards,
Mauro

Att,
Arthur Zanona