Localization
This section explains you how to integrate Localization in your application. You can also see the available properties for the Localization in SfDataGrid.
Overview
Localization is the process of making your application in different language depending on your culture. The culture is defined as combination of language and location .For example En-US is the culture for English spoken in United States.
SfDataGrid allows you to set custom resource using Resx file. You can define your string values in resource file for a specific culture and set the culture in your application.The given string value is set to the SfDataGrid.
The following steps illustrate how to implement the Localization support in your application.
- Create WinRT application and add the SfDataGrid to it.
- Create folder names as
Resources
in your application, - Create resw(resource) file and name it as Syncfusion.SfGrid.WinRT
.resw. For example, Syncfusion.SfGrid.WinRT.de.resw. - Add the default Resource file in Resource folder named as Syncfusion.SfGrid.WinRT.Resources.resw
- Enter the Name and Value in Resource file.
Set Culture Information in Application
The CultureInformation is set in the Application before the InitializeComponent() method is called. Now, the Application is set to the German Culture info. The following code example explains the implementation of this,
public partial class MainPage :Page
{
public MainPage()
{
Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride = "de";
InitializeComponent();
}
}
The following screenshot is the output for Localization,
Properties:
Property | Value | Descriptions |
---|---|---|
AddNewRowText | Click here to add a new row | AddNewRow water mark text. |
After | After | Text for After |
AfterOrEqual | After Or Equal | Text for AfterOrEqual |
AND | AND | Text for AND FilterPredicate |
Before | Before | Text for Before |
BeforeOrEqual | Before Or Equal | Text for BeforeOrEqual |
BeginsWith | BeginsWith | Text for BeginsWith |
Blanks | (Blanks) | Text for Blank filters |
Cancel | Cancel | Text for Cancel |
ClearFilter | Clear Filter | Text for Clear filters |
ColumnChooserTitle | Column Chooser | Column Chooser Window Title |
ColumnChooserWaterMark | (No Fields Available) | Empty Column Chooser Water Mark Text |
Contains | Contains | Text for Contains |
DateFilters | Date Filters | Text for DateFilters |
Done | Done | Done to close the Popup |
Empty | Empty | Text for Empty |
EndsWith | EndsWith | Text for EndsWith |
EnterValidFilterValue | Enter Valid Filter Value | Text for EnterValidFilterValue |
Equals | Equals | Text for Equals |
GreaterThan | Greater Than | Text for GreaterThan |
GreaterThanorEqual | Greater Than or Equal | Text for GreaterThanorEqual |
GroupDropAreaText | Drag a column header here to group by that column | Text for GroupDropArea |
LessThan | Less Than | Text for Less Than |
LessThanorEqual | Less Than or Equal | Text for LessThanorEqual |
NoItems | No Items | No Items to Display |
NoMatches | No Matches | No Items match |
NotContains | NotContains | Text for NotContains |
NotEmpty | NotEmpty | Text for NotEmpty |
NotEquals | NotEquals | Text For NotEquals |
NotNull | NotNull | Text for NotNull |
Null | Null | Text for Null |
NumberFilters | Number Filters | Text for NumberFilters |
OK | OK | Text for OK |
OR | OR | Text for OR FilterPredicate |
RowErrorMessage | Row Containing Error | Indicates Error by INotifyDataErrorInfo |
Search | Search | Search water mark |
SelectAll | (Select All) | Text for Select All |
ShowRowsWhere | Show rows where: | Text for ShowRowsWhere |
SortDateAscending | Sort Oldest to Newest | Text for Sort Ascending |
SortDateDescending | Sort Newest to Oldest | Text for Sort Descending |
SortNumberAscending | Sort Smallest to Largest | Text for Sort Ascending |
SortNumberDescending | Sort Largest to Smallest | Text for Sort Descending |
SortStringAscending | Sort A to Z | Text for Sort Ascending |
SortStringDescending | Sort Z to A | Text for Sort Descending |
TextFilters | Text Filters | Text for TextFilters |
AddNewRowText | Click here to add a new row | AddNewRow water mark text. |
After | After | Text for After |
AfterOrEqual | After Or Equal | Text for AfterOrEqual |
AND | AND | Text for AND FilterPredicate |