23 Comments
Note: This is a repost of my Stack Overflow question. Feel free to comment here or on the SO.

 

I'm having some problems in Windows 8 Metro apps (XAML & C#) regarding the user's regional settings. It seems that the apps won't respect user's regional settings, so even if your Windows 8 is set to display dates and times in Finnish format, the apps will still display them using US-formatting. But this is such a big problem that there must be something I'm missing?

To test this I started by creating a WPF-application. The application just prints out the CurrentCulture and the formatted DateTime.Now:

private void Culture_Loaded_1(object sender, RoutedEventArgs e) 
        { 
            this.Culture.Text = System.Globalization.CultureInfo.CurrentCulture.DisplayName; 
        }

        private void Date_Loaded_1(object sender, RoutedEventArgs e) 
        { 
            this.Date.Text = DateTime.Now.ToString(); 
        }

Here's my default regional settings:

 

When run, the app displayed the date in Finnish format:

Then I changed the regional settings to US:

And when the app was run again, the culture and formatting changed:

This is as I expected everything to work and this is also how I expected WinRT apps to work.

So as a next step, I created a WinRT (XAML & C#) app with the same code and reverted the regional settings back to Finnish. The problem: 

Even when I've defined through regional settings that the formatting should be "Finnish", the WinRT app displays the datetime with US-formatting. I then modified the app's project file and made fi-FI the default language:

This change also modified the app's culture: 

Strange. I changed the Default Language back to its default value and the formatting was restored to US. I then created folders "Strings - fi-FI" inside the project and added an empty "Resources.resw" to the project. This empty file seems to be enough, as I was now getting the Finnish formatting: 


As soon as I remove the empty resource file, the formattings reverts back to US: 


Very strange.

Any ideas? Is this a bug, or something that needs to be considered when building WinRT apps? Any ideas how thing work on the JavaScript side of things? Please chime by leaving a comment here or on the Stack Overflow.

Comments

Comment by Alexander Wang Handbags

Alexander Wang Handbags...

I am only commenting to make you understand of the cool encounter our child went through visiting your web page. She figured out lots of details, not to mention what it is like to have a wonderful helping heart to let certain people really easily compr...

Comment by hone

hone...

louis vuitton lv ornement tribe hoops headsets...

Comment by bste

bste...

louis vuitton then ascend the new shanghai world financial building 101 stories right next door...

Comment by WinRT 8.1: Regional Settings Still Misbehave

[...] regional settings still misbehave in Windows 8.1 XAML apps. They misbehaved already in Windows 8 and they continue to misbehave in apps written with a newer WinRT. Some may say that they work as [...]

Comment by home

home...

I pay a visit every day some sites and sites to read articles or reviews, but this weblog provides quality based articlesWinRT: Regional Settings Misbehave? - Mikael Koskinen....

Comment by shoes

shoes...

Wow, this post WinRT: Regional Settings Misbehave? - Mikael Koskinen is good, my younger sister is analyzing these things, thus I am going to tell her....

Comment by christian louboutin ankle boots

christian louboutin ankle boots...

$20,|000 diamond stolen from Cherry Creek Mall Denver Police say it happened around 4:30 p.|m.| on Tuesday when the man asked to see the Marquis Diamond inside the store.| He looked at it and then ran from the store taking it with him,| according to in...

Comment by relojes especiales

relojes especiales...

Western Alberta, Calgary, Canada, 27-year-old man Philip Wright replica watches originally unknown, but replica watches because two years ago riding from relojes especiales Calgary to see the earth Cup replicas de relojes in Brazil replicas relojes and...

Comment by air jordan pas cher

air jordan pas cher...

Unwittingly, simple replique montre low-key growing replique montre trend nike pas cher degradation, jewelry replica watches table high-profile replique montre revival. Consuming a brand new round replique montre of luxury air jordan pas cher fashion, ...

Comment by Relojes especiales

Relojes especiales...

Equipment nike air jordan pas cher from domestic nike blazer femme pas cher World Cup louis vuitton outlet rankings July 1, China's largest electricity supplier name trainers Library bred 11s released, the Adidas-sponsored German team and the fans equ...

Comment by Newport Box 100s Cigarettes

Newport Box 100s Cigarettes...

I am impressed by the quality of information on this website. There are a lot of good resources here....

Comment by air max 90 pas cher

air max 90 pas cher...

The brand in the "K" and "I" are replique montre two letters, plus the word mark provides "KI", the air max 90 pas cher name is Owen (Kyrie Irving) acronym, indicating that this logo really is assigned to Owen. LeBron - James MBT outlet shoes ret...

Comment by page sex

page sex...

This piece of writing will help the internet users for creating new website or even a weblog from start to end....

Comment by bred 11s for sale

bred 11s for sale...

Nike Dri-FIT replique montre technology moisture could be absorbed moisture from the skin on the outer shirt air max 90 pas cher and quickly evaporate. Heat is well generated inside the key parts, and it has a mesh aperture MBT outlet shoes of laser cu...

Comment by nike air max pas cher

nike air max pas cher...

2013 replique montre suisse Singapore Formula One Grand Prix nike air max 90 pas cher on September nike air max 1 pas cher 20 to 22 held, this louboutin femme pas cher Grand Prix could be the world's nike air max pas cher unique night replique montre ...

Comment by air max pas cher

air max pas cher...

Whether it's replique montre suisse love at first glance Romantic nike air max 90 pas cher, or after many years of nike air max 1 pas cher distance running louboutin femme pas cher Romance, by having roots Roma nike air max pas cher are inextricably l...

Comment by replique montre

replique montre...

Traditional bred 11s companies do not change you will have problems, because louis vuitton outlet customers is a wide range of online louis vuitton outlet louis vuitton outlet louis vuitton outlet retail or vertical louis vuitton outlet jordan 6 carmin...

Comment by air max 1 pas cher

air max 1 pas cher...

Unique bred 11s essence louis vuitton outlet of louis vuitton outlet louis vuitton outlet louis vuitton outlet pure, high performance, the revolutionary Chopard louis vuitton outlet jordan 6 carmine jordan 11 low Mille Miglia Zagato is the door and jor...

Comment by jordan bred 11

jordan bred 11...

Omega carry bred 11s brand celebrity louis vuitton outlet ambassadors, supermodel louis vuitton outlet louis vuitton outlet louis vuitton outlet Cindy Crawford and louis vuitton outlet jordan 6 carmine jordan 11 low media jordan concords jordan bred 11...

Comment by Nike Air Jordan Pas Cher

Nike Air Jordan Pas Cher...

In this era nike free run 5.0 pas cher Nike Air Jordan Pas Cher nike air max pas cher of focusing on high-tech nike blazer pas cher femme escarpin louboutin pas cher nike air max 90 pas cher innovation, the use of e-mail marketing Nike Air Max 1 Pas Ch...

Comment by nike air max go strong

nike air max go strong...

Do you mind if I quote a few of your posts as long as I provide credit and sources back to your site? My blog site is in the exact same niche as yours and my visitors would genuinely benefit from some of the information you present here. Please let me ...

Comment by nike air max assail

nike air max assail...

Hi! I know this is somewhat off topic but I was wondering if you knew where I could find a captcha plugin for my comment form? I'm using the same blog platform as yours and I'm having problems finding one? Thanks a lot!...