[Opensrf-commits] r1313 - trunk/src/javascript
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Apr 17 14:59:15 EDT 2008
Author: miker
Date: 2008-04-17 14:20:50 -0400 (Thu, 17 Apr 2008)
New Revision: 1313
Modified:
trunk/src/javascript/DojoSRF.js
trunk/src/javascript/opensrf.js
Log:
better locale configuriation support
Modified: trunk/src/javascript/DojoSRF.js
===================================================================
--- trunk/src/javascript/DojoSRF.js 2008-04-16 01:37:05 UTC (rev 1312)
+++ trunk/src/javascript/DojoSRF.js 2008-04-17 18:20:50 UTC (rev 1313)
@@ -14,4 +14,6 @@
this.session_cache[app] = new OpenSRF.ClientSession ( app );
return this.session_cache[app];
}
+
+ OpenSRF.locale = dojo.config.locale || (dojo.isIE ? navigator.userLanguage : navigator.language).toLowerCase();
}
Modified: trunk/src/javascript/opensrf.js
===================================================================
--- trunk/src/javascript/opensrf.js 2008-04-16 01:37:05 UTC (rev 1312)
+++ trunk/src/javascript/opensrf.js 2008-04-17 18:20:50 UTC (rev 1313)
@@ -47,6 +47,7 @@
var OSRF_STATUS_VERSIONNOTSUPPORTED = 505;
var OpenSRF = {};
+OpenSRF.locale = null;
/* makes cls a subclass of pcls */
OpenSRF.set_subclass = function(cls, pcls) {
@@ -99,7 +100,7 @@
OpenSRF.ClientSession = function(service) {
this.service = service
this.remote_id = null;
- this.locale = 'en-US';
+ this.locale = OpenSRF.locale || 'en-US';
this.last_id = 0;
this.thread = Math.random() + '' + new Date().getTime();
this.requests = [];
More information about the opensrf-commits
mailing list