{"id":4885,"date":"2014-03-30T16:25:54","date_gmt":"2014-03-30T16:25:54","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/fetch-windows-setting-value-collection-of-common-programming-errors\/"},"modified":"2014-03-30T16:25:54","modified_gmt":"2014-03-30T16:25:54","slug":"fetch-windows-setting-value-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/fetch-windows-setting-value-collection-of-common-programming-errors\/","title":{"rendered":"Fetch windows setting value-Collection of common programming errors"},"content":{"rendered":"<p>The logical place would be Windows.Globalization, but not seeing if offered there. One pretty simple workaround &#8211; faster to write than to research the setting \ud83d\ude42 is to create a Windows Runtime Component in C# that calls in to System.Globalization:<\/p>\n<pre><code>namespace WindowsRuntimeComponent\n{\n    public sealed class RegionalSettings\n    {\n        public bool isMetric()\n        {\n            return System.Globalization.RegionInfo.CurrentRegion.IsMetric;\n        }\n    }\n}\n<\/code><\/pre>\n<p>Then add as a reference to your JavaScript app and invoke there:<\/p>\n<pre><code>var r = new WindowsRuntimeComponent.RegionalSettings;\nvar isMetric = r.isMetric();\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The logical place would be Windows.Globalization, but not seeing if offered there. One pretty simple workaround &#8211; faster to write than to research the setting \ud83d\ude42 is to create a Windows Runtime Component in C# that calls in to System.Globalization: namespace WindowsRuntimeComponent { public sealed class RegionalSettings { public bool isMetric() { return System.Globalization.RegionInfo.CurrentRegion.IsMetric; } [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4885","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4885","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4885"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4885\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4885"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4885"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4885"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}