-/**
- * Necessary improvement to the translate function: Fall back to default language if translated string is not
- * available (see http://trac.openlayers.org/ticket/2308).
-*/
-
-OpenLayers.i18n = OpenLayers.Lang.translate = function(key, context) {
- var message = OpenLayers.Lang[OpenLayers.Lang.getCode()][key];
- if(!message)
- {
- if(OpenLayers.Lang[OpenLayers.Lang.defaultCode][key])
- message = OpenLayers.Lang[OpenLayers.Lang.defaultCode][key];
- else
- message = key;
- }
- if(context)
- message = OpenLayers.String.format(message, context);
- return message;
-};