Language for MonthCalendar

Editors for WPF Forum

Posted 8 years ago by Simone
Version: 10.2.0532
Avatar
Hi,

I'm using the month-calendar-control in my application.
The month names are german, but the week names (mo, th, we ...) and the Today-Button doesn't change to german.
Is this a bug? What can I do to see everything in german?

Best regards
Simone Rieß

Comments (1)

Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Simone,

This is a generally known issue with WPF when dealing with value converters, which are used for things like the week names. This page describes the solution, which is to set the Language property appropriately. In that page, they set it globally though, which is what you probably want to do also. Which looks like
public partial class App : Application
{
    static App()
    {
        FrameworkElement.LanguageProperty.OverrideMetadata(
            typeof(FrameworkElement),
            new FrameworkPropertyMetadata(
                XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag)));
    }
}


Actipro Software Support

The latest build of this product (v2019.1 build 0683) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.