[OpenLayers-Dev] status of translation possibilities
Paul Spencer
pspencer at dmsolutions.ca
Thu Oct 18 15:46:21 EDT 2007
On 18-Oct-07, at 2:31 PM, Christopher Schmidt wrote:
> setLanguage, if we're going to provide a method for it, is going to
> need
> to be more complex than that. We'd have to loop through the controls,
> and call redraw() on them, to update their text, and I'm not sure that
> all controls would support a redraw correctly.
>
Could we use an event that is triggered and then controls that have
strings can register (or be registered) for the language changing?
OpenLayers.String.events.register('languagechange',
OpenLayers.Function.bind(this, this.onLanguageChange));
Then it is a matter of implementing support in specific controls that
need it or can use it. And if there are things other than controls
that can use the current language, they can take advantage easily.
For instance, some layer types might be able to use the current
language for labeling. And applications (or application frameworks)
around OpenLayers could also take advantage of it.
We will probably want a LanguageSwitcher control that sets the
language and tracks the current language too, mostly for testing and
development.
We need a way of indicating what languages to support in any given
application, and of enumerating the supported languages through the
OpenLayers API.
We need a way to extend the base set of translations with other,
application-specific translations.
Cheers
Paul
+-----------------------------------------------------------------+
|Paul Spencer pspencer at dmsolutions.ca |
+-----------------------------------------------------------------+
|Chief Technology Officer |
|DM Solutions Group Inc http://www.dmsolutions.ca/ |
+-----------------------------------------------------------------+
More information about the Dev
mailing list