[OSGeo-Discuss] multi-lingual WMS-legends

Oliver Tonnhofer olt at omniscale.de
Tue May 24 05:26:53 PDT 2011


Hi Steven,

On 24.05.2011, at 11:51, Steven M. Ottens wrote:
> I'm currently building a multi-lingual Web-GIS application. One of the requirements is that the legends of the maps are multi-lingual. E.g. if the chosen language is English, the legend will say 'forest', whereas when the chosen language is Dutch it will say 'bos'. So no need to have all the languages in one image, using something like &lang=en is fine by me.

That would be a pragmatic solution.

> I've done a quick look in the mapserver documentation but it doesn't appear to support &lang for generating legends. Nor does the WMS 1.3.0 specification for that matter.

You should take a look at http://inspire.jrc.ec.europa.eu/documents/Network_Services/TechnicalGuidance_ViewServices_v3.0.pdf (doesn't load at the moment).

They define a language parameter that uses 3 letter ISO codes (dutch=dut, english=eng), but only for GetCapabilities requests. They suggest to return different OnlineResource URLs based on the language parameter of the capabilities request.

For &language=ger:
<OnlineResource xlink:href="http://someHOST.example/ger/GetMap?" />

It's a bit weird, but I think the reasoning behind that is that there is no proper way to tell a client that a language is not supported for a legend/map request.


Regards,
Oliver

-- 
Oliver Tonnhofer    | Omniscale GmbH & Co KG    | http://omniscale.de
http://mapproxy.org | https://bitbucket.org/olt | @oltonn







More information about the Discuss mailing list