[fusion-commits] r2093 - trunk/lib
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Tue Mar 9 13:41:25 EST 2010
Author: madair
Date: 2010-03-09 13:41:24 -0500 (Tue, 09 Mar 2010)
New Revision: 2093
Modified:
trunk/lib/fusion.js
Log:
closes #245: maintain the full locale param value
Modified: trunk/lib/fusion.js
===================================================================
--- trunk/lib/fusion.js 2010-03-08 20:17:06 UTC (rev 2092)
+++ trunk/lib/fusion.js 2010-03-09 18:41:24 UTC (rev 2093)
@@ -1346,10 +1346,12 @@
var locale = navigator.language ?
navigator.language.substring(0,2): //e.g. en-CA becomes just en
navigator.userLanguage.substring(0,2);//only use the prefix part for now,
- var s = window.location.search.toLowerCase();
+ var s = window.location.search;
var idx = s.indexOf('locale=');
if (idx>0) {
- locale = s.substring(idx+7,idx+9);
+ var temp = s.substring(idx+7);
+ var idx2 = temp.indexOf('&');
+ locale = temp.substring(0,idx2<0?temp.length:idx2);
}
window._FusionLocale = locale;
More information about the fusion-commits
mailing list