We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Grid globalization

Hi. Please provide a working example of grid globalization for the Blazor Server App. Examples from documentation do not work. Syncfusion.EJ2.Blazor 17.3.0.27 .NET Core 3.1.

5 Replies

RS Renjith Singh Rajendran Syncfusion Team November 19, 2019 01:42 AM

Hi Costa, 

We are sorry for the inconvenience caused. 

We suggest you to ensure to add the below highlighted namespace in your application. We have missed this namespace in our documentation. We will update these changes in our documentation and will refresh online. 

 
@using Microsoft.JSInterop 
@using Syncfusion.EJ2.Blazor 
@using Syncfusion.EJ2.Blazor.Grids 
 
<EjsGrid DataSource="@Orders" ...> 
    ... 
</EjsGrid> 
 
@code{ 
    [Inject] 
    IJSRuntime JsRuntime { get; set; } 
    ... 
   protected override void OnAfterRender(bool firstRender) 
    { 
        this.JsRuntime.Ejs().LoadLocaleData("wwwroot/locale.json").SetCulture("de"); 
    } 
} 


Note : And also ensure to provide the proper path for the “locale.json” file. In the above code, we have contained a “locale.json” file inside the “wwwroot” folder. 

We have prepared a sample based on this, please download the sample from the link below, 
 
If you are still facing difficulties, we need more details to further proceed on this, kindly share with us the following details for better assistance. 
  1. Share the details of the problem or script error you are facing.
  2. Share a video demo showing the problem you are facing.
  3. Share the type of application you are using. (Blazor WebAssembly Client or Blazor Server Side)

The provided information will help us analyze the problem, and provide you a solution as early as possible. 

Regards, 
Renjith Singh Rajendran. 



CO Costa November 19, 2019 04:13 AM

Thanks. Looks like I haven't read the documentation carefully. Everything works as it should.


RS Renjith Singh Rajendran Syncfusion Team November 20, 2019 12:25 AM

Hi Costa, 

Thanks for your update. 

We are happy to hear that the provided solution helped to achieve your requirement. 

Please get back to us if you need further assistance. 

Regards, 
Renjith Singh Rajendran. 



HA Halber Albarracin March 6, 2021 09:45 PM

HI, do you have an example with ej2 .net core 2.2 ? 
I tried but not works

thanks



SM Shalini Maragathavel Syncfusion Team March 8, 2021 08:24 AM

Hi Costa, 

Thanks for the update. 

Based on your query we have prepared sample for Grid with localization in .net core 2.2 version . Please refer the Code example for your reference  

 
 
<ejs-grid id="Grid" allowPaging="true" allowGrouping="true"  locale="de-DE" allowExcelExport="true" toolbar="@(new List<string>() { "ExcelExport", "Add", "Edit", "Delete", "Update", "Cancel" })"> 
   
    <e-grid-columns> 
. . .
    </e-grid-columns> 
</ejs-grid> 
 
<script> 
    ej.base.L10n.load({s 
        'de-DE': { 
            'grid': { 
                'EmptyRecord': 'Keine Aufzeichnungen angezeigt', 
                'GroupDropArea': 'Ziehen Sie einen Spaltenkopf hier, um die Gruppe ihre Spalte', 
                'UnGroup': 'Klicken Sie hier, um die Gruppierung aufheben', 
                'EmptyDataSourceError': 'DataSource darf bei der Erstauslastung nicht leer sein, da Spalten aus der dataSource im AutoGenerate Spaltenraster', 
                'Item': 'Artikel', 
                'Items': 'Artikel', 
                'Excelexport':'Exportia excel' 
            }, 
            'pager': { 
                'currentPageInfo': '{0} von {1} Seiten', 
                'totalItemsInfo': '({0} Beiträge)', 
                'firstPageTooltip': 'Zur ersten Seite', 
                'lastPageTooltip': 'Zur letzten Seite', 
                'nextPageTooltip': 'Zur nächsten Seite', 
                'previousPageTooltip': 'Zurück zur letzten Seit', 
                'nextPagerTooltip': 'Zum nächsten Pager', 
                'previousPagerTooltip': 'Zum vorherigen Pager' 
            } 
        } 
    }); 
</script> 


Please find the  below sample for more information. 
Documentation : https://ej2.syncfusion.com/aspnetcore/documentation/grid/global-local/#localization

Please get back to us if you need further assistance with this. 

Regards, 
Shalini M. 


Loader.
Live Chat Icon For mobile
Up arrow icon