[Mapbender-dev] switching languages for error messages

Marc Jansen jansen.marc at gmx.de
Sat Feb 3 10:57:35 EST 2007

Hey list

Christoph Baudson (WhereGroup) schrieb:
> Hello again,
> I would like to make the language of error messages or button labels 
> configurable in Mapbender. 

This surely would be a nice thing to have

> I'm not sure what is the best approach.
> * is a global switch desirable?
> * is a GUI-wide switch better? (spontaneously I would prefer this one)
> * or just a switch for each module?
Why not have all three?

- a global variable for the language...
- might be overwritten by a GUI-wide-setting...
- might be overwritten by a module setting...

A somehow cascading approach.

> What data structure would be suited for this approach?
> * associative array like errorMessage['en'] or errorMessage['de'] 
> (with a global var language = 'de')
> ** pro: errorMessage[language] automatically selects the correct 
> entry. (no need for if(language == "de") ...)
> ** con: errorMessage = new Array(); has to be instantiated for each 
> variable...a conf file's size would grow rapidly...may be neglectable
> .
> .
I would vote for the errorMessage[language] - thing

> .
> * database or .conf-file or element var?

I would suggest using a database solution.

More information about the Mapbender_dev mailing list