Ox.load: when loading modules, set locale

This commit is contained in:
rolux 2013-05-09 19:02:28 +02:00
parent 9c66eced09
commit ad4603ddb4

View file

@ -33,7 +33,7 @@ Ox.load <f> Loads one or more modules
@*/
Ox.load = function() {
var callback = arguments[arguments.length - 1],
length, loaded = 0, modules = {}, succeeded = 0,
length, loaded = 0, localeFiles = [], modules = {}, succeeded = 0,
type = Ox.typeOf(arguments[0]);
function done(success) {
Ox.documentReady(function() {
@ -66,7 +66,11 @@ Ox.load = function() {
function() {
Ox.load[module](options, function(success) {
succeeded += success;
++loaded == length && callback(succeeded == length);
if (++loaded == length) {
Ox.setLocale(Ox.LOCALE, function() {
callback(succeeded == length);
});
}
});
}
);