1

I'm developing an Universal App for Win8.1, i've added the Winrt Xaml Toolkit dll but when i use Calendar control the strings of months appear only in English. Is there any way to change them? I'm going crazy :D

PS: I've downloaded the source code of dll but there is no track of these strings

  • I have no experience with this, but I thought "Universal App" is for Windows 10 only, and Windows 8/8.1 Apps are no longer supported? – Barmak Shemirani Oct 15 '15 at 15:08
  • The term "Universal Apps" was first introduced when Windows 8.1 and WP 8.1 came out, because you were able to have a shared code base for the desktop and the phone, just like the the "Windows Universal Apps" with Win10 – Kristian Vukusic Oct 15 '15 at 18:02

1 Answers1

0

If you look at the DateTimeHelper class, you can see the method GetCurrentDateFormat which uses the en-US format. This method is used in many places for the Calendar and CalendarItem controls from the toolkit.

You can try to import the project from the site instead of using the NuGet package and then change this method to use your device locale. You can maybe change it to something like this:

public static DateTimeFormatInfo GetCurrentDateFormat()
{
    return CultureInfo.CurrentCulture.DateTimeFormat;
}

I haven't tested this code so this is just a hint where you should look for your solution.

Kristian Vukusic
  • 3,284
  • 6
  • 30
  • 46
  • i've tried to import project instead of NuGet package, so i've generated my .dll's (Toolkit and Calendar) from source code and added to my project. But when i'm using the Calendar Control, it generate a StackOverflow exception in GetPatternCore method from CalendarAutomationPeer. – claudio.paccone Oct 16 '15 at 09:29
  • My mistake, i've added dll from "obj" folder and not from "bin". Thanks very much! I think this is a little important bug for this good library! – claudio.paccone Oct 16 '15 at 10:53
  • 1
    I've seen reports of it before and now started looking into fixing it. – Filip Skakun Oct 16 '15 at 16:48
  • Hi Filip, i've tried to contact you with mail about a week ago...like Kristian suggests i've replaced in DateTimeHelper en-US format with CultureInfo.CurrentCulture.Calendar – claudio.paccone Oct 19 '15 at 13:44