[Mapbender-dev] switching languages for error messages

Christoph Baudson (WhereGroup) christoph.baudson at wheregroup.com
Fri Feb 2 05:26:52 EST 2007


Hello again,

I would like to make the language of error messages or button labels 
configurable in Mapbender. 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?

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
.
.
.

* database or .conf-file or element var?
** the messages should not be part of the script's source
** arrays in element vars are inconvenient
.
.
.

This is just a first glance at the subject, maybe someone has better 
ideas. I think it would be very desirable to have some kind of language 
switch.

Christoph


More information about the Mapbender_dev mailing list