Welcome to MSDN Blogs Sign in | Join | Help

RegionInfo objects are sensitive to a specific culture.

You can use a RegionInfo() object with a region name in the constructor, like "US", however that doesn't always provide appropriate results.  The RegionInfo properties, such as DisplayName for example, depend on the language and culture being used.  So often it is more interesting to construct a RegionInfo from a full culture name like "en-US" than from just the region name.

Consider for example a locale like "es-US" on Windows Vista.  In that case, you'd probably want a display name of "Estados Unitos" instead of "United States".  In other cases there could be script differences, ie "AZ" has the variations of "az-Latn-AZ" and "az-Cyrl-AZ".  The Latin and Cyrillic scripts can be very different: Azərbaycanca vs Азәрбајҹан.

Lastly, if you have a specific culture, like "en-US", then its nice to keep the detail around.  If you have to try and create a new CultureInfo or RegionInfo object from just the "en" or "US" name you have lost information.  It is best to use the most specific form possible when practical.

 

 

Published Monday, September 25, 2006 3:13 PM by shawnste

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker