Ox.load: when loading modules, set locale
This commit is contained in:
parent
9c66eced09
commit
ad4603ddb4
1 changed files with 6 additions and 2 deletions
|
@ -33,7 +33,7 @@ Ox.load <f> Loads one or more modules
|
||||||
@*/
|
@*/
|
||||||
Ox.load = function() {
|
Ox.load = function() {
|
||||||
var callback = arguments[arguments.length - 1],
|
var callback = arguments[arguments.length - 1],
|
||||||
length, loaded = 0, modules = {}, succeeded = 0,
|
length, loaded = 0, localeFiles = [], modules = {}, succeeded = 0,
|
||||||
type = Ox.typeOf(arguments[0]);
|
type = Ox.typeOf(arguments[0]);
|
||||||
function done(success) {
|
function done(success) {
|
||||||
Ox.documentReady(function() {
|
Ox.documentReady(function() {
|
||||||
|
@ -66,7 +66,11 @@ Ox.load = function() {
|
||||||
function() {
|
function() {
|
||||||
Ox.load[module](options, function(success) {
|
Ox.load[module](options, function(success) {
|
||||||
succeeded += success;
|
succeeded += success;
|
||||||
++loaded == length && callback(succeeded == length);
|
if (++loaded == length) {
|
||||||
|
Ox.setLocale(Ox.LOCALE, function() {
|
||||||
|
callback(succeeded == length);
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue