Hi Mehmood,
Thanks for contacting Syncfusion support.
We suggest you to load cldr files using Ajax post to reduce the bundle size.
Please find the below code example for your reference.
//loading locale files
L10n.load({
'de': {
'calendar': { today: 'heute' }
},
"ar": {
"calendar": {
today: 'اليوم'
}
},
});
//Function for loading locale files based on culture name
function loadCultureFiles(name:any) {
let files: string[] = ['ca-gregorian.json', 'numbers.json', 'timeZoneNames.json'];
if (name === 'ar') {
files.push('numberingSystems.json');
}
let loadCulture = function (prop:any) {
let val:string, ajax: Ajax;
if (name === 'ar' && prop === files.length - 1) {
ajax = new Ajax( './node_modules/cldr-data/supplemental/' + files[prop], 'GET', false);
} else {
ajax = new Ajax( './node_modules/cldr-data/main/' + name + '/' + files[prop], 'GET', false);
}
ajax.onSuccess = function (value:any) {
val = value;
loadCldr(JSON.parse(val));
};
ajax.send();
};
for (let prop = 0; prop < files.length; prop++) {
loadCulture(prop);
}
}
loadCultureFiles('de');
For your convenience we have created a typescript application to load cldr files using Ajax and the same can be referred from the below link.
Please get back to us if you require any further assistance on this.
Regards,
Jesus Arockia Sankaran S