DataGrid for WPF and Silverlight Overview > DataGrid Features > Localizing the Application > Adding Resource Files |
As with Windows Forms, you can create a set of resource files for the DataGrid for WPF assembly. You can create separate resource files, with the extension .resx, for each required culture. When the application runs you can switch between those resources and between languages. Note that all parts of your application using components from a DataGrid for WPF DLL must use the same localization resource.
Localization Conventions
To localize the grid you would need to set up resource files for each localized culture. The following conventions are recommended when creating .resx resource files:
All .resx files should be placed in the Resources subfolder of your project.
Files should be named as follows:
XXX.YYY.resx, where:
For example:
Localization Strings
The following table lists strings that can be added to an .resx file to localize your application:
String | Default Value | Description |
---|---|---|
AddNewRow | Click here to add a new row | Text that appears in the add new row. |
CheckBoxFilter_Checked | Checked | Text that appears in the filter for check box columns to indicate if the column should be filtered for checked and unchecked items. |
ComboBoxFilter_S electAll |
Select All | Text that appears in the filter for check box columns to select all items. |
DateTimeFilter_End | End | Text that appears in the filter for date time columns for the end of the date time range. |
DateTimeFilter_Start | Start | Text that appears in the filter for date time columns for the end of the date time range. |
EmptyGroupPanel | Drag a column here to group by that column. | Text that appears in the grouping area of the grid when no columns are grouped. |
Filter_Clear | Clear | Text that appears in the filter bar to clear the filter condition. |
Filter_Filter | Filter | Text that appears in the filter bar to add a filter condition. |
NumericFilter_And | And | Text that appears in the filter bar for numeric columns to indicate multiple filter conditions. |
NumericFilter_Equals | Equals | Text that appears in the filter bar for numeric columns to indicate the filter condition should apply to exact matches only. |
NumericFilter_GreaterOrEquals | Greater/Equals | Text that appears in the filter bar for numeric columns to indicate the filter condition should apply to items with higher values than the condition value or exact matches only. |
NumericFilter_Greater | Greater | Text that appears in the filter bar for numeric columns to indicate the filter condition should apply to items with higher values than the condition value. |
NumericFilter_Less | Less | Text that appears in the filter bar for numeric columns to indicate the filter condition should apply to items with lower values than the condition value. |
NumericFilter_LessOrEquals | Less/Equals | Text that appears in the filter bar for numeric columns to indicate the filter condition should apply to items with lower values than the condition value or exact matches only. |
NumericFilter_NotEquals | Not Equals | Text that appears in the filter bar for numeric columns to indicate the filter condition should apply to items that are not an exact match. |
NumericFilter_Or | Or | Text that appears in the filter bar for numeric columns to indicate multiple filter conditions. |
TextFilter_Contains | Contains | Text that appears in the filter for text columns to indicate if the filter condition should apply to items that contain the value of the condition. |
TextFilter_Equals | Equals | Text that appears in the filter bar for text columns to indicate the filter condition should apply to exact matches only. |
TextFilter_NotEquals | Not Equals | Text that appears in the filter bar for text columns to indicate the filter condition should apply to items that are not an exact match. |
TextFilter_StartsWith | Starts With | Text that appears in the filter for text columns to indicate if the filter condition should apply to items that start with the value of the condition. |