I am just facing a problem in getting the user set region in Windows Phone 8.1 (SilverLight).
Situation: I have set the Region to United Kingdom
and the language to English(United States)
(it is valid to do that).
In that case I am still getting the region UnitedState(US)
via these methods:
RegionInfo
Thread.CurrentThread
System.Globalization
private static void GetRegion()
{
// all of the three returing UnitedStates.
var dfg = RegionInfo.CurrentRegion;
var cuture = Thread.CurrentThread.CurrentCulture;
var cul = CultureInfo.CurrentCulture;
}
Why do these not return United Kingdom
as a region?
Building on my previous answer: Detect OS Language WP 8.1
string region =
Windows.System.UserProfile.GlobalizationPreferences.HomeGeographicRegion;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With