[mapserver-users] Re: mapserver and i18n

Smith, Michael ERDC-CRREL-NH michael.smith at usace.army.mil
Wed Oct 6 20:14:09 EDT 2010


Very nice Steve.

This will always have to be driven by the client as its the client that
initiates the connection and has the language info (and often you can not
count on this, from what I've seen of the Swiss use of language discovery
from clients). You just have to encode the lang the server discovers as cgi
environment variables and then pass to MapServer which gets passed to the
database.


On 10/6/10 8:05 PM, "Stephen Woodbridge" <woodbri at swoodbridge.com> wrote:

> On 10/6/2010 7:23 PM, Michael Smith wrote:
>> I would do this on the backend. Pass a language variable to your data
>> query
>> 
>> DATA "geom from data where lang='%lang%'" LABELITEM "%LANG%HIGHWAY"
>> 
>> And have one mapfile and just have your translations in
>> PostGis/Oracle/etc.
>> 
>> Mike
>> 
>> 
> 
> Yeah, that is what I have done but that requires the client to handle
> the management of the language selection and as Bart is pointing out the
> language selection should be handled on the server.
> 
> Here is an example where you can select English, Arabic or French for
> the language of the Instructions.
> 
> http://gis.imaptools.com/routing/leaddog/?zoom=10&lat=33.865&lon=35.52263&laye
> rs=B0TTTF&start=35.484217%2033.830394&stop=35.627718%2033.92659&method=STS&lan
> g=arb
> 
> It obviously needs more work to translate the whole page but my job was
> to just deal with the instructions part of this.
> 
> -Steve



More information about the mapserver-users mailing list