Skip to main content

Localizing Your DevExpress-powered .NET App – Your Feedback Matters

We hope to validate a few hypotheses about our Localization Service, Unified Component Installer, overall localization quality, and ways to translate strings in general.

Take the survey Not interested

GanttLocalizer Class

Provides captions and date-time formats for the GanttControl. Allows you to provide custom caption and date-time formats.

Namespace: DevExpress.XtraGantt.Localization

Assembly: DevExpress.XtraGantt.v24.2.dll

NuGet Package: DevExpress.Win.Gantt

#Declaration

public class GanttLocalizer :
    XtraLocalizer<GanttStringId>

#Remarks

Inherit from the GanttLocalizer class and override the GetString(GanttStringId) method to customize captions and date-time formats.

#Example

The code below shows how to localize the date-time format for days in the timescale ruler and captions for commands in a Ribbon control.

using DevExpress.XtraGantt.Localization;

GanttLocalizer.Active = new MyGanttLocalizer();

public class MyGanttLocalizer : GanttLocalizer {
    public override string GetLocalizedString(GanttStringId id) {
        switch (id) {
            case GanttStringId.BothPanelsVisibilityCaption: return "Task List and Chart"; break;
            case GanttStringId.DayFormat: return "dddd, d"; break;
            default: return base.GetLocalizedString(id);
        }
    }
}
See Also