windowsforms-devexpress-dot-xtraverticalgrid-dot-localization.md
A base class that provides necessary functionality for custom localizers of the Vertical Grid control.
Namespace : DevExpress.XtraVerticalGrid.Localization
Assembly : DevExpress.XtraVerticalGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.VerticalGrid
public class VGridLocalizer :
XtraLocalizer<VGridStringId>
Public Class VGridLocalizer
Inherits XtraLocalizer(Of VGridStringId)
Note
There are controls that only satellite assemblies can translate (for example, the Search dialog in XtraReports). We recommend that you use satellite assemblies to translate the application. Also, note that satellite assemblies are ignored if you use a custom localizer.
For more information on utilizing the VGridLocalizer class, refer to the Localizing WinForms Controls via Localizer Objects document.
The code below demonstrates how you can localize Vertical Grid‘s captions in the row header context menu.
using DevExpress.XtraVerticalGrid.Localization;
VGridLocalizer.Active = new MyVGridLocalizer();
class MyVGridLocalizer : VGridLocalizer {
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);
}
}
}
Imports DevExpress.XtraVerticalGrid.Localization
VGridLocalizer.Active = New MyVGridLocalizer()
Friend Class MyVGridLocalizer
Inherits VGridLocalizer
Public Overrides ReadOnly Property Language As String
Get
Return "English"
End Get
End Property
Public Overrides Function GetLocalizedString(ByVal id As VGridStringId) As String
Select Case 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"
Case Else
Return MyBase.GetLocalizedString(id)
End Select
End Function
End Class
Object XtraLocalizer XtraLocalizer<DevExpress.XtraVerticalGrid.Localization.VGridStringId> VGridLocalizer
See Also