Globalization and Localization

Localization

All text in Grid can be localized using ej.Grid.Locale object. Please find the table with list of properties and its value in locale object.

Locale key words Text
EmptyRecord No records to display
PagerInfo {0} of {1} pages ({2} items)
GroupDropArea Drag a column header here to group its column
DeleteOperationAlert No records selected for delete operation
EditOperationAlert No records selected for edit operation
ForeignKeyAlert The updated value should be a valid foreign key value
SaveButton Save
OKButton OK
CancelButton Cancel
EditFormTitle Details of
AddFormTitle Add New Record
GroupCaptionFormat {{:headerText}}: {{:key}} - {{:count}} {{if count == 1 }} item {{else}} items {{/if}}
BatchSaveConfirm Are you sure you want to save changes?
BatchSaveLostChanges Unsaved changes will be lost. Are you sure you want to continue?
ConfirmDelete Are you sure you want to Delete Record?
CancelEdit Are you sure you want to Cancel the changes?
FrozenColumnsViewAlert Frozen columns should be in grid view area
FrozenColumnsScrollAlert Enable allowScrolling while using frozen Columns
FrozenNotSupportedException Frozen Columns and Rows are not supported for Grouping, Row Template, Detail Template, Hierarchy Grid and Batch Editing
Add Add
Edit Edit
Delete Delete
Update Update
Cancel Cancel
Done Done
Columns Columns
PrintGrid Print
ExcelExport Excel Export
WordExport Word Export
PdfExport PDF Export
StringMenuOptions [{text: "StartsWith",value: "StartsWith"},{text: "EndsWith",value: "EndsWith"},{text: "Contains",value: "Contains"},{text: "Equal",value: "Equal"},{text: "NotEqual",value: "NotEqual"}]
NumberMenuOptions [{text: "LessThan",value: "LessThan"},{text: "GreaterThan",value: "GreaterThan"},{text: "LessThanOrEqual",value: "LessThanOrEqual"},{text: "GreaterThanOrEqual",value: "GreaterThanOrEqual"},{text: "Equal",value: "Equal"},{text: "NotEqual",value: "NotEqual"}]
PredicateAnd AND
PredicateOr OR
Filter Filter
FilterMenuCaption Filter Value
FilterbarTitle 's filter bar cell
MatchCase Match Case
NoResult No Matches Found
Clear Clear
ResponsiveFilter Filter
ResponsiveSorting Sort
Search Search
SelectAll (Select All)
DatePickerWaterMark Select date
NumericTextBoxWaterMark Enter value
EmptyDataSource DataSource must not be empty at initial load since columns are generated from dataSource in AutoGenerate Column Grid
EmptyRowValidationMessage At least one field must be updated
True True
False False
UnGroup Click here to ungroup
AddRecord Add Record
EditRecord Edit Record
DeleteRecord Delete Record
Save Save
Grouping Group
Ungrouping Ungroup
UnGroup Click here to ungroup
SortInAscendingOrder Sort In Ascending Order
SortInDescendingOrder Sort In Descending Order

Pager Localization

Paging in Grid can also be localized using the ej.Pager.Locale object. Please find the table with list of properties and its value in locale object.

Locale key words Text
PagerInfo {0} of {1} pages ({2} items)
firstPageTooltip Go to first page
lastPageTooltip Go to last page
nextPageTooltip Go to next page
previousPageTooltip Go to previous page
nextPagerTooltip Go to next Pager
previousPagerTooltip Go to previous Pager
  • html
  • <ej-grid id="Grid" [allowPaging]="true"  [dataSource]="gridData" [allowGrouping]='true' [groupSettings]="group"  [pageSettings]='page' [locale]="locale" (load)="load($event)" >
        <e-columns>
            <e-column field="OrderID" headerText="OrderID"  width="75" textAlign="right"></e-column>
            <e-column field="CustomerID" headerText="Customer ID" width="95"></e-column>
            <e-column field="EmployeeID" headerText="EmployeeID"  width="95" textAlign="right"></e-column>
            <e-column field="Freight" headerText="Freight" format="{0:C}"  width="75" textAlign="right"></e-column>
            <e-column field="ShipCity" headerText="ShipCity" width="80"></e-column>       
            
        </e-columns>
    </ej-grid>
  • javascript
  • import { Component } from '@angular/core';
    
    @Component({
        selector: 'ej-app',
        templateUrl: 'src/grid/grid.component.html',
    })
    export class GridComponent {
        public gridData: any;
        public locale: any;
        public group: any;
    
        load(e: any) {
    
            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: ":  - 8 BeiträgeBeiträges",
                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"
            };
    
        }
    
        constructor() {
            this.group = { enableDropAreaAnimation: false };
            this.locale = "de-DE";
            //The datasource "window.gridData" is referred from 'http://js.syncfusion.com/demos/web/scripts/jsondata.min.js'
            this.gridData = (window as any).gridData;
    
        }
    }

    IMPORTANT

    You need to change pager locale in ej.Pager.Locale object.

    Excel-Filter Localization

    All text in Excel-Filter can be localized using the ej.ExcelFilter.Locale object. Please find the table with list of properties and its value in locale object.

    Locale key words Text
    SortNoSmaller Sort Smallest to Largest
    SortNoLarger Sort Largest to smallest
    SortTextAscending Sort A to Z
    SortTextDescending Sort Z to A
    SortDateOldest Sort By Oldest
    SortDateNewest Sort By Newest
    SortByColor Sort By Color
    SortByCellColor Sort By Cell Color
    SortByFontColor: Sort By Font Color:
    FilterByColor Filter By Color
    SortColorOptions: [{ id: 1, background:"#FFFFFF"}, {id: 2, background:"#5EABDA"}],
    CustomSort Custom Sort
    FilterColorOptions { id: 1, background:"#FFFFFF"}, {id: 2, background:"#5EABDA"}],
    FilterByCellColor Filter By Cell Color
    FilterByFontColor Filter By Font Color
    ClearFilter Clear Filter
    NumberFilter Number Filter
    TextFilter Text Filter
    DateFilter Date Filter
    DateTimeFilter Date Time Filters
    GuidFilter Guid Filters
    StringMenuOptions [{ text:"Equal",value:"equal"},{ text:"Not Equal", value:"notequal"},{ text:"Starts With",value:"startswith"}, { text:"Ends With",value:"endswith"},{ text:"Contains",value:"contains"}, {text:"Custom Filter", value:"customfilter"}],
    NumberMenuOptions [{text:"Equal",value:"equal"}, {text:"Not Equal",value:"notequal"}, { text:"Less Than",value:"lessthan"}, {text:"Less Than Or Equal", value:"lessthanorequal"}, {text:"Greater Than",value:"greaterthan"},{ text:"Greater Than Or Equal", value:"greaterthanorequal"}, { text:"Between",value:"between"},{ text:"Custom Filter", value:"customfilter"}]
    DateMenuOptions [{ text:"Equal", value:"equal"}, {text:"Not Equal",value:"notequal"},{text:"Less Than",>value:"lessthan"}, {text:"Less Than Or Equal",value:"lessthanorequal"}, {text:"Greater Than",value:"greaterthan"},{text:"Greater Than Or Equal", value:"greaterthanorequal"}, { text:"Between",value:"between"},{ text:"Custom Filter", value:"customfilter"}]
    DatetimeMenuOptions [{ text: "Equal", value: "equal" }, { text: "Not Equal", value: "notequal" }, { text: "Less Than", value: "lessthan" }, { text: "Less Than Or Equal", value: "lessthanorequal" }, { text: "Greater Than", value: "greaterthan" }, { text: "Greater Than Or Equal", value: "greaterthanorequal" }, { text: "Between", value: "between" }, { text: "Custom Filter", value: "customfilter" }]
    Top10MenuOptions [{ text:"Top", value:"top"},{text:"Bottom", value:"bottom"}]
    GuidMenuOptions [{ text: "Equal", value: "equal" }, { text: "Not Equal", value: "notequal" }, { text: "Custom Filter", value: "customfilter" }]
    title Custom Filter
    PredicateOr OR
    PredicateAnd AND
    OK OK
    MathCase Match Case
    Cancel Cancel
    NoResult No Match Found
    CheckBoxStatusMsg Not all items showing
    DatePickerWaterMark Select date
    DateTimePickerWaterMark Select date time
    True True
    False False
    SelectAll Select All
    Blanks Blanks
    Showrowswhere Show rows where
    NumericTextboxWaterMark Enter value
    Search Search
    AddToFilter Add current selection to filter

    Please find the code

  • html
  • <ej-grid id="Grid" [allowPaging]="true"  [dataSource]="gridData"  [allowFiltering]="true" [filterSettings]="filter"  [locale]="locale" (load)="load($event)" >
       
        <e-columns>
            <e-column field="OrderID" headerText="OrderID"  width="75" textAlign="right"></e-column>
            <e-column field="CustomerID" headerText="Customer ID" width="95"></e-column>
            <e-column field="EmployeeID" headerText="EmployeeID"  width="95" textAlign="right"></e-column>
            <e-column field="Freight" headerText="Freight" format="{0:C}"  width="75" textAlign="right"></e-column>
            <e-column field="ShipCity" headerText="ShipCity" width="80"></e-column>       
            
        </e-columns>
    </ej-grid>
  • javascript
  • import { Component } from '@angular/core';
    
    @Component({
        selector: 'ej-app',
        templateUrl: 'src/grid/grid.component.html',
    })
    export class GridComponent {
        public gridData: any;
        public locale: any;
        public filter: any;
        load(e: any) {
    
            ej.ExcelFilter.Locale["de-DE"] = {
                SortNoSmaller: "Art Anzahl kleiner",
                SortNoLarger: "Art Anzahl größer",
                SortTextAscending: "Sortieren aufsteigend Text",
                SortTextDescending: "Sortieren absteigend Text",
                SortDateOldest: "Sortieren Datum Älteste",
                SortDateNewest: "Datum sortieren Neueste",
                ClearFilter: "Filter löschen",
                DateTimeFilter: "Datum Filter",
                DateFilter: "Datum Filter"
            }
    
        }
    
        constructor() {
            this.filter = { filterType: "excel" };
            this.locale = "de-DE";
            //The datasource "window.gridData" is referred from 'http://js.syncfusion.com/demos/web/scripts/jsondata.min.js'
            this.gridData = (window as any).gridData;
    
        }
    }

    IMPORTANT

    We have uploaded the predefined language packs for some commonly used cultures in this github location. Refer to the github location for getting the predefined language packs for the corresponding culture. The culture file has localized texts for all the Syncfusion controls.

    Globalization

    ej.globalize library is used to globalize numeric values in Grid control using format property in columns. Globalize values will be automatically used when locale property is set with locale string value for example en-US.

  • html
  • <ej-grid id="Grid" [allowPaging]="true"  [dataSource]="gridData"   [locale]="locale"  >
       
         <e-columns>
            <e-column field="OrderID" headerText="OrderID"  width="75" textAlign="right"></e-column>
            <e-column field="CustomerID" headerText="Customer ID" width="95"></e-column>
            <e-column field="EmployeeID" headerText="EmployeeID"  width="95" textAlign="right"></e-column>
            <e-column field="Freight" headerText="Freight" format="{0:C}"  width="75" textAlign="right"></e-column>
            <e-column field="ShipCity" headerText="ShipCity" width="80"></e-column>       
            
        </e-columns>
    </ej-grid>
  • javascript
  • import { Component } from '@angular/core';
    
    
    @Component({
        selector: 'ej-app',
        templateUrl: 'src/grid/grid.component.html',
    })
    export class GridComponent {
        public gridData: any;
        public locale: any;
       
        constructor() {
           
            this.locale = "de-DE";
            //The datasource "window.gridData" is referred from 'http://js.syncfusion.com/demos/web/scripts/jsondata.min.js'
            this.gridData = (window as any).gridData;
        }
    }

    IMPORTANT

    To translate our control content from default English to any of the culture, say For example - German language, then you need to refer the ej.culture.de-DE.min.js file in your application, after the reference of ej.web.all.min.js file. For all culture files, please download from the GitHub location.

    See Also

    localization

    Right to Left - RTL

    By default, Grid render its text and layout from left to right. To customize Grid’s direction, you can change direction from LTR to RTL by using enableRTL as true.

  • html
  • <ej-grid id="Grid" [allowPaging]="true"  [dataSource]="gridData" [enableRTL]="true"  >
       
         <e-columns>
            <e-column field="OrderID" headerText="OrderID"  width="120" textAlign="right"></e-column>
            <e-column field="CustomerID" headerText="Customer ID" width="120"></e-column>
            <e-column field="EmployeeID" headerText="EmployeeID"  width="120" textAlign="right"></e-column>
            <e-column field="Freight" headerText="Freight" format="{0:C}"  width="120" textAlign="right"></e-column>
            <e-column field="ShipCity" headerText="ShipCity" width="120"></e-column>       
            
        </e-columns>
    </ej-grid>
  • javascript
  • import { Component } from '@angular/core';
    
    
    @Component({
        selector: 'ej-app',
        templateUrl: 'src/grid/grid.component.html',
    })
    export class GridComponent {
        public gridData: any;   
       
        constructor() {       
            //The datasource "window.gridData" is referred from 'http://js.syncfusion.com/demos/web/scripts/jsondata.min.js'
           this.gridData = (window as any).gridData;
    
        }
    }