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

Localization

You can use the GanttLocalizer class to localize captions and date-time formats in the Gantt control. Use the GanttStringId enumeration to identify a caption or a date-time format. See Localizing WinForms Controls with Localizer Objects for more information.

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);
        }
    }
}

Note

You can also use satellite assemblies to localize WinForms controls. See Localizing WinForms Controls with Satellite Resource Assemblies for more information.