Globalization of Excel Filter

Hello, 

I just implemented your de.json from Github and it works. 

but some parts are missing, i tried some combinations but cant imagine the right one. 

So I am askin for some Json lines to add.

Attachment: screenshot_6c21fb17.zip

3 Replies 1 reply marked as answer

SK Sujith Kumar Rajkumar Syncfusion Team December 4, 2020 11:56 AM UTC

Hi Maik, 
 
Greetings from Syncfusion support. 
 
Based on the query and attached screenshot we could understand that your requirement is to localize the sort texts present in the excel filter. You can achieve this by setting the corresponding locale texts to the following keys, 
 
ej.base.L10n.load({ 
        'de': { 
            "grid": { 
                "SortAtoZ": "Sortieren Sie von A bis Z.", 
                "SortZtoA": "Sortieren Sie Z nach A.", 
                "SortByNewest": "Nach Neuestem sortieren", 
                "SortByOldest": "Sortieren nach Älteste", 
                "SortLargestToSmallest": "Groß bis klein sortieren", 
                "SortSmallestToLargest": "Klein bis groß sortieren", 
            }, 
        } 
}); 
  
We have prepared a sample based on this for your reference. You can find it below, 
 
 
Since the sort options in the ‘Excel’ filter is a newly implemented feature, the above keys are not yet added in the ej2-locale file in GitHub. We have logged an internal task to include this and it will be updated and refreshed online in any of our upcoming releases. Until then your patience is appreciated. 
 
Please get back to us if you require any further assistance. 
 
Regards, 
Sujith R 



LI Liviu replied to Sujith Kumar Rajkumar June 25, 2021 09:46 PM UTC

Hello, 


The supplied Sample is not working for data filtering. The filter window option apears but when you try to acces any data filter options the error "Uncaught TypeError: Cannot convert undefined or null to object at Function.keys (<anonymous>)"

apears in console.



VS Vignesh Sivagnanam Syncfusion Team June 28, 2021 10:35 AM UTC

Hi Maik 
  
Thanks for the update 
  
Based on your query we suspect that you have faced issue while open the filter dialog in the data column in the provided sample. So, we have validated your issue and found that the issue is reproduced because the datepicker culture is not applied to the data picker in the dialog. To resolve the issue at your end, we suggest you to apply culture for the datapicker. You can use the below code example to resolve the issue at your end. 
  
Please refer the below sample, code example and documentation for your reference, 
  
  
function loadCultureFiles(name) { 
    var files = ['ca-gregorian.json', 'numbers.json', 'timeZoneNames.json']; 
    if (name === 'de') { 
      files.push('numberingSystems.json'); 
    } 
    var loader = ej.base.loadCldr; 
    var loadCulture = function (prop) { 
      var val, ajax; 
      if (name === 'de' && prop === files.length - 1) { 
        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); 
    } 
  } 
  
  
Regards 
Vignesh Sivagnanam 


Marked as answer
Loader.
Up arrow icon