Make it possible to exclude Console.js and Lang/en.js for really small builds. r=bartvde (closes #2882)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@10967 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2010-12-15 09:42:19 +00:00
parent 4c3d4c77c0
commit b61cec71a1
26 changed files with 26 additions and 2 deletions

View File

@@ -101,7 +101,7 @@ OpenLayers.Lang = {
*/
translate: function(key, context) {
var dictionary = OpenLayers.Lang[OpenLayers.Lang.getCode()];
var message = dictionary[key];
var message = dictionary && dictionary[key];
if(!message) {
// Message not found, fall back to message key
message = key;