VGridResLocalizer.GetLocalizedString(VGridStringId) Method
Returns a caption for the specified user interface element.
Namespace: DevExpress.XtraVerticalGrid.Localization
Assembly: DevExpress.XtraVerticalGrid.v21.1.dll
NuGet Packages: DevExpress.Win.Design, DevExpress.Win.VerticalGrid
Declaration
Parameters
Name | Type | Description |
---|---|---|
id | DevExpress.XtraVerticalGrid.Localization.VGridStringId | A value that specifies the UI element whose caption should be localized. |
Returns
Type | Description |
---|---|
String | A String value that specifies the UI element’s caption. |
Remarks
Override this method in a VGridResLocalizer descendant to modify the caption of a specific user interface element.
Example
The code below shows how to localize captions in row header context menus.
using DevExpress.XtraVerticalGrid.Localization;
VGridLocalizer.Active = new MyVGridResLocalizer();
class MyVGridResLocalizer : VGridResLocalizer {
public override string Language { get { return "English"; } }
public override string GetLocalizedString(VGridStringId id) {
switch (id) {
case VGridStringId.MenuPropertySortAscending: return "Sort Ascending";
case VGridStringId.MenuPropertySortDescending: return "Sort Descending";
case VGridStringId.MenuPropertyClearSorting: return "Clear Sorting";
case VGridStringId.MenuPropertyClearSortingAllProperties: return "Clear All Sorting";
default: return base.GetLocalizedString(id);
}
}
}
See Also