Texts in filter popup of ejs-grid columns are not getting translated



We want to implement translations for the filter popup.

filterOptions: FilterSettingsModel = {

      type: 'Menu'

    };

We tried to do it in following way - 

     1. In ngOnInit method of ts file, we wrote below code :

          L10n.load({

                 'de-DE': {

                  grid: {

                      FilterButton: 'filter text',

                     ClearButton: 'clear text'

                   },

           }

          });


   2. In html-        

`<ejs-grid [dataSource]='data' [locale]='de-DE' [allowGrouping]='true' height='220px'

 [filterSettings]='filterOptions'

>

       <e-columns>

              <e-column field='OrderID' headerText='Order ID' textAlign='Right' width=120></e-column>

                   ....

              </e-columns>

   </ejs-grid>`



But still the texts are not getting translated. We also tried to use setCulture(' de-DE') before L10n.load(), still it's not working. 

Please let us know, what we are missing and if there is any other way to get the translations.


1 Reply

PS Pavithra Subramaniyam Syncfusion Team June 2, 2022 06:45 AM UTC

Hi Rohit Swarup,


Thanks for contacting Syncfusion support.


We suggest setting the “locale” property as in the below code example to overcome the reported behavior.


 

<ejs-grid #grid [dataSource]="data" locale="de-DE" allowFiltering="true" [filterSettings]="filterSettings"> 

  .  .  .

  </ejs-grid>

 

 


Sample: https://stackblitz.com/edit/angular-dkcrpj-lgdfrr?file=app.component.html


If you are still facing the issue, please share the below details that will be helpful for us to provide a better solution as early as possible.


  1. Share the Syncfusion package version
  2. Share the issue reproducible sample if possible
  3. Or try to reproduce the issue in the given sample


Regards,

Pavithra S


Loader.
Up arrow icon