[mapserver-users] Multilingual map files

Kralidis,Tom [Ontario] Tom.Kralidis at ec.gc.ca
Wed Feb 4 11:14:27 EST 2009


 

> -----Original Message-----
> From: mapserver-users-bounces at lists.osgeo.org 
> [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of 
> Peter Hopfgartner
> Sent: Wednesday, 04 February 2009 08:47
> To: mapserver-users at lists.osgeo.org
> Cc: Paolo Viskanic
> Subject: [mapserver-users] Multilingual map files
> 
> Dear list members
> 
> I would like ask how map files for multilingual applications 
> are handled by mapserver users.
> 
> Multilingual information may impact the map in various ways. 
> As by now, those come to mind:
> 
> * Fix strings in the map file, (NAME, DESCRIPTION etc)
> * Database borne data, changing column for different 
> languages as for LABELITEM
> * Queries changing with language, so that DATA/FILTER 
> statements must be adapted to the current language (e.g. 
> WHERE lang_id='en').
> 
> What we are currently doing is to write the mapfiles like:
> 
>     CLASS
>         NAME "IT:Progetti linee|DE:Projekte Linien"
>         SYMBOL 'circle'
>         SIZE 3
>         COLOR 0 0 255
>     END
> 
>     METADATA
>         "DESCRIPTION" "IT:Progetti|DE:Projekte"
>     END
> 
>     LABELITEM "IT:gemi|DE:gemd"
> 
> and modify the labels through Mapscript before rendering the 
> map. This works if the map file is processed by Mapscript, 
> whereas it would not work for CGI and W*S services. We would 
> need a map file for each language for those services.
> 

For WxS, the specs themselves don't handle this, but it would be nice to
handle multilingual metadata in one document, i.e.:

<Name xml:lang="en-CA">road</Name>
<Name xml:lang="fr-CA">rue</Name>

In our environment, we've created one mapfile / language.  One thing you
could do is use MapScript WxS to intercept an incoming request (say with
an extended lang parameter), then, once you have the lang, set the
values in the mapfile accordingly.

..Tom


> How do you handle i18n in MapServer?
> 


More information about the mapserver-users mailing list