[OpenLayers-Dev] status of translation possibilities
Gertjan van Oosten
gertjan at West.NL
Fri Oct 19 11:37:46 EDT 2007
As quoted from Jachym Cepicky <jachym.cepicky at gmail.com>:
> Christopher Schmidt pí??e v Pá 19. 10. 2007 v 10:18 -0400:
> > On Fri, Oct 19, 2007 at 03:08:35PM +0200, Jachym Cepicky wrote:
> > > > Good point. I had forgotten about that. We should update teh RFC to take
> > > > that (and other things in this thread) into account.
> > >
> > > I was thinking, that rather then return default "en" translation, it
> > > could return the untranslated message back. Since I still suppose,
> > > translation keys will be strings in english, result will be the same.
> > Right. Though perhaps support for a 'fallback' language in addition to
> > just returning the translation string makes sense? It wouldn't be that
> > hard, in any case -- a couple extra lines of code in String.translate()
> just to be sure: "support" yes, but not "assume", everything will always
> be translated even in "fallback" language
In MapBuilder we use message keys to look up the message; think of
mnemonical names like featureNotFound or pointProjectsToInfinity.
If a messageKey is not found for the selected language, and the
messageKey is not found for the default language, then the messageKey
itself is returned as the message. That way you a. get at least some
message for every key and b. can easily inspect visually that a
messageKey has not yet been translated into even the default language.
-- Gertjan van Oosten, gertjan at West.NL, West Consulting B.V., +31 15 2191 600
More information about the Dev