Using a recent version of geoserver the GetLegend graphics can be localized.
Before adapt the client side code to support GetLegendGraphic localization (and remove the needs for manually create an image for each legend) below there is a useful Unred.js hack to use the legendGraphics in monolanguage portals :
substitute the line below (shouild be the line around 400)::
Using a recent version of geoserver the GetLegend graphics can be localized.
Before adapt the client side code to support GetLegendGraphic localization (and remove the needs for manually create an image for each legend) below there is a useful Unred.js hack to use the legendGraphics in monolanguage portals :
substitute the line below (shouild be the line around 400)::
//table += '<td colspan="2" style="width:100%;background-color:white"><img src="static/loc/' + languageCode + '/images/' + layerConf.legend + '" /></td>';
with this
table += '<td colspan="2" style="width:100%;background-color:white"><img src="' + layerConf.bas eUrl + '?REQUEST=stg_geoserver/GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=20&HEIGHT=20&LAYER=' + layerConf. wmsName + '" /></td>';