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:
Tim Schaub
2008-02-15 21:15:48 +00:00
parent bafc8b758b
commit fa55f54e32
30 changed files with 479 additions and 162 deletions

View File

@@ -234,17 +234,7 @@ OpenLayers.Layer.WFS = OpenLayers.Class(
//DEPRECATED - REMOVE IN 3.0
// don't load data if current zoom level doesn't match
if (this.options.minZoomLevel) {
var err = "The minZoomLevel property is only intended for use " +
"with the FixedZoomLevels-descendent layers. That this " +
"wfs layer checks for minZoomLevel is a relic of the" +
"past. We cannot, however, remove it without possibly " +
"breaking OL based applications that may depend on it." +
" Therefore we are deprecating it -- the minZoomLevel " +
"check below will be removed at 3.0. Please instead " +
"use min/max resolution setting as described here: " +
"http://trac.openlayers.org/wiki/SettingZoomLevels";
OpenLayers.Console.warn(err);
OpenLayers.Console.warn(OpenLayers.i18n('minZoomLevelError'));
if (this.map.getZoom() < this.options.minZoomLevel) {
return null;
@@ -481,7 +471,7 @@ OpenLayers.Layer.WFS = OpenLayers.Class(
commitSuccess: function(request) {
var response = request.responseText;
if (response.indexOf('SUCCESS') != -1) {
this.commitReport('WFS Transaction: SUCCESS', response);
this.commitReport(OpenLayers.i18n("commitSuccess", {'response':response}));
for(var i = 0; i < this.features.length; i++) {
this.features[i].state = null;
@@ -490,7 +480,7 @@ OpenLayers.Layer.WFS = OpenLayers.Class(
// foreach features: set state to null
} else if (response.indexOf('FAILED') != -1 ||
response.indexOf('Exception') != -1) {
this.commitReport('WFS Transaction: FAILED', response);
this.commitReport(OpenLayers.i18n("commitFailed", {'response':response}));
}
},