[Windows 8] How to get the user’s current culture ?
July 26th, 2012 | Posted by in .NET | Article | HTML5 | Windows 8 | WinJS | WinRT | Read: 849In .NET application, to retrieve the user’s current culture is pretty simple using the CultureInfo class. But performing the same thing, in particular using Javascript, is a bit more complex.
So here is a quick code sample to perform this task:
As you can see, we just need to access to the languages property of the GlobalizationPreferences class. This property is an array containing all the cultures installed and used on the machine.
Here is the results of the previous call:
Simple but very useful ! To see more content about localization, check here: http://msdn.microsoft.com/en-us/library/windows/apps/hh465006.aspx
Happy coding!
You can follow any responses to this entry through the RSS 2.0 You can leave a response, or trackback.





Pingback: Windows 8 Developer Links – 2012-07-27Dan Rigby | Dan Rigby