Scroll infinite Culture 'ES'

Good Morning,
I am using the infinite scroll functionality in a grid and when I change the culture to Spanish I find a problem that renders the same row twice, when in the DataManager I get a single record.
Another problem is with the dateTimePicker, the label that I put on the component does not translate for me.
Thanks


       var ajax = new ej.base.Ajax('../src/es.json', 'GET', true);
            ajax.onSuccess = function (value) {
                // Assigning locale text value for Essential JS 2 components

                ej.base.L10n.load(JSON.parse(value));
                // set culture globally

                ej.base.setCulture('es');
                // Cargar los ficheros de internacionalización

                loadCultureFiles('es');
            };
            ajax.send();


function loadCultureFiles(name) {
    // var files = ['ca-gregorian.json', 'numbers.json', 'timeZoneNames.json'];
    var files = ['currencies.json', 'ca-gregorian.json', 'numbers.json', 'timeZoneNames.json'];
    var loader = ej.base.loadCldr;
    var loadCulture = function (prop) {
        var val, ajax;
        ajax = new ej.base.Ajax(location.origin + location.pathname + '/../../scripts/cldr-data/' + name + '/' + files[prop], 'GET', false);
        ajax.onSuccess = function (value) {
            val = value;
        };
        ajax.send();
        loader(JSON.parse(val));
    };
    for (var prop = 0; prop < files.length; prop++) {
        loadCulture(prop);
    }
}



1 Reply 1 reply marked as answer

TS Thiyagu Subramani Syncfusion Team May 25, 2021 02:18 AM UTC

Hi Diego, 

Thanks for contacting Syncfusion forum. 

Based on your shared information we have prepared a sample using ‘es’ culture with infinite scrolling, but it was unsuccessful to reproduce your reported issues at our end. Grid rows renders fine. Please refer to the below code and sample for your reference.  
 
@Html.AntiForgeryToken() 
<ejs-grid id="Grid"  load="onLoad" height="400" enableInfiniteScrolling="true" toolbar="@(new List<string>() {"Add", "Edit", "Update", "Delete" })"> 
    . . . . . . . . . . . . . . . .  
</ejs-grid> 
<script> 
    . . . . . . . . . .  
    document.addEventListener('DOMContentLoaded', function () { 
        var grid = document.getElementById('Grid').ej2_instances[0]; 
        var L10n = ej.base.L10n; 
        L10n.load({ 
            'es': { 
                "grid": { 
                    "Add": "Añadir", 
                    "Edit": "Editar", 
                    "Cancel": "Cancelar", 
                    "Update": "Actualizar", 
                    "Delete": "Eliminar", 
                    "Print": "Impresión", 
                    . . . . . . . . .  
                }, 
                "pager": { 
                    "currentPageInfo": "{0} de {1} páginas", 
                    "totalItemsInfo": "({0} artículos)", 
                    "firstPageTooltip": "Ir a la primera página", 
                    "lastPageTooltip": "Ir a la última página", 
                    "nextPageTooltip": "Ir a la página siguiente", 
                    "previousPageTooltip": "Regresar a la pagina anterior", 
                    "nextPagerTooltip": "Ir al siguiente localizador", 
                    "previousPagerTooltip": "Ir al localizador anterior", 
                    "pagerDropDown": "Artículos por página", 
                    "pagerAllDropDown": "Artículos", 
                    "All": "Todos", 
                    "totalItemInfo": "({0} artículo)" 
                }, 
                "datetimepicker": { 
                    "today": "Hoy", 
                    "placeholder": "Elige una fecha y hora" 
                } 
            } 
        }); 
        loadCultureFiles('es'); 
        ej.base.setCulture('es'); 
        grid.locale = 'es'; 
    }); 
 
    function loadCultureFiles(name) { 
        var files = ['ca-gregorian.json', 'numbers.json', 'timeZoneNames.json']; 
        if (name === 'es') { 
            files.push('numberingSystems.json'); 
        } 
        var loader = ej.base.loadCldr; 
        var loadCulture = function (prop) { 
            var val, ajax; 
            if (name === 'es' && prop === files.length - 1) { 
                debugger; 
                ajax = new ej.base.Ajax(location.origin + location.pathname + '/../../scripts/cldr-data/supplemental/' + files[prop], 'GET', false); 
            } else { 
                ajax = new ej.base.Ajax(location.origin + location.pathname + '/../../scripts/cldr-data/main/' + name + '/' + files[prop], 'GET', false); 
            } 
            ajax.onSuccess = function (value) { 
                val = value; 
            }; 
            ajax.send(); 
            loader(JSON.parse(val)); 
        }; 
        for (var prop = 0; prop < files.length; prop++) { 
            loadCulture(prop); 
        } 
    } 
 
</script> 

Screenshot:  

 




If still facing the issue, please share below details then only we provide the appropriate solution as soon as possible. 

  1. Share issue reproducing sample or reproduce the above issue in above sample.
  2. Video demonstration of your reported issue.
  3.  DateTimePicker, the label that I put on the component does not translate – Are you mentioning placeholder property or else? Explain briefly?
  4. Syncfusion package version.

Please get back to us, if you need any further assistance. 

Regards, 
Thiyagu S 


Marked as answer
Loader.
Up arrow icon