Adding framework for internationalization support. The new OpenLayers.Lang.translate method takes a key and looks for a value in a dictionary based on the current language setting. Set a new language code with OpenLayers.Lang.setCode. Get the current code with OpenLayers.Lang.getCode. Thanks to Mike Adair for the lead on this one. r=ahocevar,me (closes #109)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6313 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
25
lib/OpenLayers/Lang/en-CA.js
Normal file
25
lib/OpenLayers/Lang/en-CA.js
Normal file
@@ -0,0 +1,25 @@
|
||||
/* Copyright (c) 2006-2008 MetaCarta, Inc., published under the Clear BSD
|
||||
* license. See http://svn.openlayers.org/trunk/openlayers/license.txt for the
|
||||
* full text of the license. */
|
||||
|
||||
/**
|
||||
* @requires OpenLayers/Lang/en.js
|
||||
*/
|
||||
|
||||
/**
|
||||
* Namespace: OpenLayers.Lang["en-CA"]
|
||||
* Dictionary for English-CA. This dictionary inherits from the standard
|
||||
* English dictionary. Override only those entries with language specific
|
||||
* to the CA region.
|
||||
*
|
||||
* Keys for entries are used in calls to <OpenLayers.Lang.translate>. Entry
|
||||
* bodies are normal strings or strings formatted for use with
|
||||
* <OpenLayers.String.format> calls.
|
||||
*/
|
||||
OpenLayers.Lang['en-CA'] = OpenLayers.Util.applyDefaults({
|
||||
|
||||
// add any entries specific for this region here
|
||||
// e.g.
|
||||
// "someKey": "Some regionally specific value"
|
||||
|
||||
}, OpenLayers.Lang["en"]);
|
||||
Reference in New Issue
Block a user