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
close icon

AngularJS Grid localization

Hello,

I want to localize my grid created with AngularJS Syncfusion components. eg.:

<div id="id" ej-grid e-datasource="data" ></div>

The question is, how to do it, because there on wiki is no sample for that: https://help.syncfusion.com/angular-1/grid/overview

Regards,
Martin Rasovsky



1 Reply

PK Prasanna Kumar Viswanathan Syncfusion Team June 16, 2017 07:23 AM UTC

Hi Martin, 

Thanks for contacting Syncfusion support. 

To localize the grid, use locale API of ejGrid and we have to provide the localization string value by adding a property(property name should be same as locale name) to the object “ej.Grid.Locale”.  
 
Find the code example and sample : 
 


<div ng-app="employeeView"> 
    <div ng-controller="GridCtrl"> 
        <div ej-grid id="Grid" e-width="500px" e-datasource="data" ----- e-locale="de-DE" > 
            ------------------- 
</div> 
 
<script> 
   
    angular.module('employeeView', ['ejangular']) 
        .controller('GridCtrl', function ($scope) { 
            $scope.tools = ["add", "edit", "delete", "update", "cancel"]; 
            $scope.page = 2; 
            $scope.data = window.gridData; 
        }); 
 
    ej.Grid.Locale["de-DE"] = { 
        EmptyRecord: "Keine Aufzeichnungen angezeigt", 
        GroupDropArea: "Ziehen Sie eine Spaltenüberschrift hier", 
        DeleteOperationAlert: "Keine Einträge für Löschvorgang ausgewählt", 
        EditOperationAlert: "Keine Einträge für Bearbeiten Betrieb ausgewählt", 
        SaveButton: "Speichern", 
        CancelButton: "stornieren", 
        EditFormTitle: "Korrektur von", 
        GroupCaptionFormat: "{{:field}}: {{:key}} - {{:count}} {{if count == 1}}Beiträge{{else}}Beiträges{{/if}}", 
        UnGroup: "Klicken Sie hier, um die Gruppierung aufheben" 
    }; 
    ej.Pager.Locale["de-DE"] = { 
        pagerInfo: "{0} von {1} Seiten ({2} Beiträge)", 
        firstPageTooltip: "Zur ersten Seite", 
        lastPageTooltip: "Zur letzten Seite", 
        nextPageTooltip: "Zur nächsten Seite", 
        previousPageTooltip: "Zurück zur letzten Seite", 
        nextPagerTooltip: "Zum nächsten Pager", 
        previousPagerTooltip: "Zum vorherigen Pager" 
    }; 
</script> 



Find the list of properties and its value in locale object from the below documentation.  



Regards, 
Prasanna Kumar N.S.V 


Loader.
Live Chat Icon For mobile
Up arrow icon