[OpenLayers-Dev] OpenLayers Internationalization

Christopher Schmidt crschmidt at metacarta.com
Fri Jul 13 11:32:44 EDT 2007


On Fri, Jul 13, 2007 at 10:08:17AM -0500, Erik Uzureau wrote:
> Do we want to have support for live switching of languages?
> 
> ie whenever a string is added to the interface (so not for log/warns),
> it would register the component with the string manager, then when
> user says OL.StringManager.setLanguage("catalan") it would cycle
> through and update alll the live components?

I don't think so. I think, since layers won't have text in them, that
changing the language can then have the user remove and destroy any
existing controls, and then re-add them after switching the 'current'
language. That way, you don't have a complete reset of your map, but you
also don't have the complexity of trying to change existing DOM elements
either. 

Alternatively, controls could have a 'redraw()' function, which would
actually cause the control to essentially start over from scratch -- in
this way, a 'setNewLanguage' would just be a language='foo', followed by
looping over the controls (or anything which displays text) and
redrawing it.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Dev mailing list