Grid localization

Hello!
Please do not abuse it. I start working with your components now in ASP.NET. Found this example:


I can not understand how to localize to different languages and where to look at the documentation. If you look at the documentation for this link (for the example that is above), then it seems like it's not quite right.


1 Reply

VA Venkatesh Ayothi Raman Syncfusion Team April 28, 2018 12:18 PM UTC

Hi Slava, 

Thanks for using Syncfusion products. 

We have already created a UG documentation for this “Grid Localization”, but we have faced the same issue while re-direct to the Globalization UG documentation page. So, we have considered this “Globalization documentation link didn’t map” as a bug and logged the documentation task. It will be on live in an upcoming release. Until we suggest you to use following code example to define globalization in EJ2-MVC Grid. 
The Localization library allows you to localize default text content of the Grid. The grid component has static text on some features (like group drop area text, pager information text, etc.) that can be changed to other cultures (Arabic, Deutsch, French, etc.) by defining the [locale] value and translation object. 
To load translation object in an application, use load function of L10n class, 
The following example demonstrates the Grid in Deutsch culture, 
[Grid] 
 
@Html.EJS().Grid("Grid").DataSource((IEnumerable<object>)ViewBag.dataSource).Columns(col => 
{ 
    col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true).Width("120").Add(); 
    col.Field("CustomerID").HeaderText("Customer Name").Width("150").Add(); 
    col.Field("ShipName").HeaderText("Ship Name").Width("150").Add(); 
    col.Field("ShipCountry").HeaderText("Ship Country").Width("150").Add(); 
 
}).AllowPaging().AllowGrouping().Locale("de-DE").PageSettings(page => page.PageSize(6)).Render() 
 
 
<script> 
        ej.base.L10n.load({ 
            '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' 
                }, 
                '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 let us know if you have any further assistance on this. 

Regards, 
Venkatesh Ayothiraman. 


Loader.
Up arrow icon