Hello,
Does anyone knows how to get the country code from Current Thread when I have "en-US"?
I know how to get the language code but not the country code.
Thank You,
Miguel
Create a RegionInfo object using a CultureInfo object and calling LCID.
// Creates a RegionInfo using a CultureInfo.LCID. RegionInfo myRI2 = new RegionInfo( new CultureInfo("en-US",false).LCID );
RegionInfo has a ton of properties, one of which has what you need: http://msdn.microsoft.com/en-us/library/system.globalization.regioninfo.aspx
RegionInfo regionInfo = new RegionInfo(System.Threading.Thread.CurrentThread.CurrentUICulture.LCID);