allow setting locale urls for locale=en

This commit is contained in:
j 2021-04-01 11:56:38 +02:00
parent 47fc01742f
commit c61d173922

View file

@ -45,15 +45,19 @@
]); ]);
} }
}); });
}
url && Ox.makeArray(url).forEach(function(value) { url && Ox.makeArray(url).forEach(function(value) {
urls.push(Ox.makeArray(value)); urls.push(Ox.makeArray(value));
}); });
if (urls.length) {
Ox.getJSON(urls, function(data) { Ox.getJSON(urls, function(data) {
Ox.forEach(data, function(values, url) { Ox.forEach(data, function(values, url) {
Ox.extend(translations, values); Ox.extend(translations, values);
}); });
callback(true); callback(true);
}); })
} else {
callback(true);
} }
} else { } else {
callback(false); callback(false);