Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get Current Region of Windows phone 8.1

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?

like image 720
loop Avatar asked Nov 11 '14 10:11

loop


1 Answers

Building on my previous answer: Detect OS Language WP 8.1

string region =
    Windows.System.UserProfile.GlobalizationPreferences.HomeGeographicRegion;
like image 97
Chubosaurus Software Avatar answered Oct 11 '22 14:10

Chubosaurus Software