[OpenLayers-Dev] Additional Lang Files
chris.claydon at autodesk.com
Fri Jan 30 11:58:58 EST 2009
Thank you very much for this information. (I was looking at the 2.7 source rather than trunk - the Spanish file must have been added after that branch was created).
Following your recommendation, we'll implement the new resource(s) based on the de.js file (i.e. two-character extension, extend English resources).
From: Christopher Schmidt [mailto:crschmidt at metacarta.com]
Sent: Friday, January 30, 2009 5:22 AM
To: Chris Claydon
Cc: dev at openlayers.org
Subject: Re: [OpenLayers-Dev] Additional Lang Files
On Thu, Jan 29, 2009 at 03:00:15PM -0800, Chris Claydon wrote:
> I work on the MapGuide Open Source project, which makes use of OpenLayers via the Fusion open source viewer. We'd like to add support for Spanish, Hungarian, and possibly Japanese localized strings to OpenLayers, and we have a couple of questions...
I think what you're seeing is clear evidence that there is not a strong
consensus on the right way to do language files yet. :) Our typical
coding style dictator (Erik) was not involved in the i18n process, so we
didn't get the usual set of process instructions for these files :)
What I would recommend is:
* Creating a two-char lang file for the 'base' of the language
* If there is a different interpretation of the language for a
sub-language -- for example, en-GB spells 'colour' differently --
extend from the default/'base' of that language.
OpenLayers will automatically handle taking the user's client
language ("en-GB") and falling back to en if there is no -GB
* I don't have an opinion on whether we should extend from English
or not. If we do, then missing translations get an english string. I
we don't, missing translations get a string like
'olMessageStringKey'. I tend to think the former is better than the
latter -- at least *some* foreign speakers will be able to handle it,
as opposed to 'none'.
> So, when creating new language resources, which is the best model to follow? Is there any documentation on this, or any general guidelines?
Not yet, but I'm glad to hear you're interested in helping to build them
:) More seriously, I'd welcome a cleanup according to the suggestions
above, barring any clear objections on a technical basis from other
members of the community.
Also, I'm presuming you're aware that there is already a spanish
More information about the Dev