var elements = locale.split('-'); var searchlist = []; for(var i = elements.length; i > 0; i--){ searchlist.push(elements.slice(0, i).join('-')); } searchlist.push(false); if(down){searchlist.reverse();} 
var elements = locale.split('-'); var searchlist = []; for(var i = elements.length; i > 0; i--){ searchlist.push(elements.slice(0, i).join('-')); } searchlist.push(false); if(down){searchlist.reverse();} 
dojo.hostenv.searchLocalePath = function(/*String*/locale, /*Boolean*/down, /*Function*/searchFunc){//	summary://		A helper method to assist in searching for locale-based resources.  Will iterate through//		the variants of a particular locale, either up or down, executing a callback function.//		For example, "en-us" and true will try "en-us" followed by "en" and finally "ROOT".	locale = dojo.hostenv.normalizeLocale(locale);	var elements = locale.split('-');	var searchlist = [];	for(var i = elements.length; i > 0; i--){		searchlist.push(elements.slice(0, i).join('-'));	}	searchlist.push(false);	if(down){searchlist.reverse();}	for(var j = searchlist.length - 1; j >= 0; j--){		var loc = searchlist[j] || "ROOT";		var stop = searchFunc(loc);		if(stop){ break; }	}}
6315	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/6315/2f1d2cb699c9d9329e8b782b0463156e211cb0f6/struts_dojo.js.uncompressed.js/buggy/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js.uncompressed.js