ComponentOne CalendarView for WinForms
CalendarView for WinForms / Using Controls / CalendarView Features / Culture Settings
In This Topic
    Culture Settings
    In This Topic

    CalendarView allows you to change regional settings to display calendar in specific locales or languages. The control enables formatting, parsing, and validating data depending upon cultural settings. It is possible to include string comparison, numeric, and date time formats and special characters like decimal point character in culture settings.

    CalendarView supports full localization on week title and month title through the System.Globalization Namespace. It includes information pertaining to the culture such as language, country/region, and format patterns for dates, currency, and numbers etc. Specifying locale for the current culture affects the string displayed on the week title and the month title. By default, the current culture designates through the CurrentCulture property of System.Threading.Thread.CurrentThread.

    To use a culture other than the current culture, set the desired culture by specifying the culture name. For more information about different culture names and identifiers, see CultureInfo class in .NET Framework documentation.

    The following image shows CalendarView with the French culture applied.

    The following code snippet shows how to set the current culture in CalendarView.

    ' Set desired culture, for example here the French (France) locale.
    System.Threading.Thread.CurrentThread.CurrentCulture = New System.Globalization.CultureInfo("fr-FR")
    
    ' This call is required by the Windows Form Designer.
    InitializeComponent()
    
    // Set desired culture, for example here the French (France) locale.
    System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("fr-FR");
    
    // This call is required by the Windows Form Designer.
    InitializeComponent();
    
    See Also