Search code examples
c#wpftelerikcalendar-control

change the calendar control in WPF


Is there a way to change the current calendar control in wpf or telerik? I am doing translation in my application. When I change language to Japanese, is there a way to include the Japanese calendar control instead of the English one.


Solution

  • Set the FrameworkElement.Language property of your control or apply the xml:lang attribute to the XAML of your control. The value you have to set is xml:lang="ja-JP".

    from msdn CultureInfo

    For example,

    XAML:

    <Window x:Class="WpfApplication1.MainWindow"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xml:lang="ja-JP"
            Title="MainWindow" Height="350" Width="525">
        <Grid>
            <Calendar />
        </Grid>
    </Window>
    

    Output

    enter image description here