Hi Michael,
thank you for your feedbacks on the functionality: can you open a JIRA
issue with your observations?

Thanks
Mauro

2015-09-15 3:52 GMT+02:00 Michael Colin <[email protected]>:

> Hello Mauro,
>
> thank you very much for the quick reply. This helped me use the built-in
> way rather than writing my own solution via an extension, though the
> extension was pretty much ready to go at that point.
>
> I noticed one rather big issue for some applications though:
> "lang" really only specifies the lang, not the country. If I try to use
> the locale instead, e.g. es_ES, it will simply not work. Or maybe I just
> tried it the wrong way, who knows. But if not, wouldn't it be an easy fix
> to allow for any kind of string as input to lang instead of the current
> solution? Luckily for my purposes this isn't an issue.
>
> A few other things that came up with my test cases:
> Localized doesn't seem to accept a namespace. In my example the following
> wouldn't work whereas the 2nd snipped worked:
>                         <?xml version="1.0"
> encoding="UTF-8"?><sld:StyledLayerDescriptor xmlns="
> http://www.opengis.net/sld"; xmlns:sld="http://www.opengis.net/sld";  ....
>                         <sld:Title>Design
>                           <sld:Localized lang="es">Diseño</Localized>
>                           <sld:Localized lang="pt">Design</Localized>
>                           <sld:Localized lang="ru">Точность
> сетки</Localized>
>                         </sld:Title>
>                 working:
>                         <sld:Title>Design
>                           <Localized lang="es">Diseño</Localized>
>                           <Localized lang="pt">Design</Localized>
>                           <Localized lang="ru">Точность сетки</Localized>
>                         </sld:Title>
>
> When uploading a style through the GUI it is not encoded as UTF8 and the
> internationalised values are mangled. I had to upload them manually into
> the styles directory instead.
>
> Thank you once again and have a good day :)
>
> Cheers,
> Michael
>
>
>
> From:        Mauro Bartolomeoli <[email protected]>
> To:        Michael Colin <[email protected]>
> Cc:        GeoServer Mailing List List <
> [email protected]>
> Date:        11/09/2015 05:40 PM
> Subject:        Re: [Geoserver-users] WMS GetLegendGraphic i18n
> ------------------------------
>
>
>
> Hi Michael,
> indeed there is some support for it, but it's not well documented (I will
> try to add some documentation ASAP).
> You can use the parameter LANGUAGE to choose a particular locale, then you
> can use the following syntax in SLD to specify some of the metadata in
> several languages:
>
> <Title>Basso-Basso
>       <Localized lang="it">Basso-Basso</Localized>
>       <Localized lang="en">Low-Low</Localized>
>       <Localized lang="fr">Faible-Faible</Localized>
>       <Localized lang="de">Niedriges-Niedriges</Localized>
>   </Title>
>
> The text directly inside Title is the default (when no language parameter
> is specified). The text in a Localized tag is used when LANGUAGE is equal
> to the lang attribute value.
>
> This syntax can be used for the following SLD Title and Abstract tags.
>
> Regards,
> Mauro
>
>
> 2015-09-11 0:50 GMT+02:00 Michael Colin <*[email protected]*
> <[email protected]>>:
> Hello :)
>
> I recently started using GeoServer and am currently trying to learn the
> ropes. My new project has been using GeoServer for some time now. They
> currently are on version 2.5. Now I received the task to add
> internationalization to the legend drawn from the style of a layer. I could
> do it with custom functions but I would prefer a native way over building
> my own mechanism. I found this mailing list entry:
> *http://osgeo-org.1560.x6.nabble.com/SLD-and-Internationalization-td5054597.html*
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__osgeo-2Dorg.1560.x6.nabble.com_SLD-2Dand-2DInternationalization-2Dtd5054597.html&d=BQMFaQ&c=p0oa49nxxGtbbM2qgM-GB4r4m9OlGg-sEp8sXylY2aQ&r=A3KdcnVyFqLMOOqCdo2429zd-IRYbqVdYcNdu2zOiik&m=wTMfYXRqEIckVire6Wg_aRUKRgkFNUpAY2s-NrlbXic&s=LdPR017MTTPSr7z5oVDfLVfL5WtQsR5Ip_gSUnDawqQ&e=>
> which seems to address my issue exactly. But as I can find no mention of
> this in the documentation I am not sure if this made it into the
> application as of yet.
>
> Does anyone know if the SLD i18n was implemented? And if so, which
> parameter do I have to set to define the locale for the getLegendGraphic (
> *http://docs.geoserver.org/stable/en/user/services/wms/get_legend_graphic/legendgraphic.html#get-legend-graphic*
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__docs.geoserver.org_stable_en_user_services_wms_get-5Flegend-5Fgraphic_legendgraphic.html-23get-2Dlegend-2Dgraphic&d=BQMFaQ&c=p0oa49nxxGtbbM2qgM-GB4r4m9OlGg-sEp8sXylY2aQ&r=A3KdcnVyFqLMOOqCdo2429zd-IRYbqVdYcNdu2zOiik&m=wTMfYXRqEIckVire6Wg_aRUKRgkFNUpAY2s-NrlbXic&s=V7DGxUWJGJFL3YsBy-ouxaRkVNX_-wUNUyHP6cLW13I&e=>)
> request?
>
> Cheers,
> Michael
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Geoserver-users mailing list
> *[email protected]*
> <[email protected]>
> *https://lists.sourceforge.net/lists/listinfo/geoserver-users*
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.sourceforge.net_lists_listinfo_geoserver-2Dusers&d=BQMFaQ&c=p0oa49nxxGtbbM2qgM-GB4r4m9OlGg-sEp8sXylY2aQ&r=A3KdcnVyFqLMOOqCdo2429zd-IRYbqVdYcNdu2zOiik&m=wTMfYXRqEIckVire6Wg_aRUKRgkFNUpAY2s-NrlbXic&s=SFRDCICdqDZ5kYMhiWFahi0Wz6n7bAGNGKgkd0zX3Dw&e=>
>
>
>
------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to