Reputation: 9242
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?
Upvotes: 5
Views: 2001
Reputation: 9434
You could use the RegionInfo.CurrentRegion
property as mentioned here which you normally use for WP8 or WP8.1.
Detecting home country of Windows Phone 7
Upvotes: 0
Reputation: 8161
Building on my previous answer: Detect OS Language WP 8.1
string region =
Windows.System.UserProfile.GlobalizationPreferences.HomeGeographicRegion;
Upvotes: 5