Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CultureInfo.EnglishName Property

July 28, 2014

Gets the culture name in the format "language (country/region)" in English.

Namespace:  System.Globalization
Assembly:  mscorlib (in mscorlib.dll)

public virtual string EnglishName { get; }

Property Value

Type: System.String
The culture name in the format "language (country/region)" in English, where language is the full name of the language and country/region is the full name of the country or region.

For example, the EnglishName for the specific culture "en-US" is "English (United States)".

The value of this property is the same, regardless of the language version of the .NET Framework.

The following example displays the EnglishName property as well as the DisplayName and NativeName properties of several cultures.


using System;
using System.Globalization;
using System.Windows.Media;

public class Example
{
   public static void Demo(System.Windows.Controls.TextBlock outputBlock)
   {
      outputBlock.FontFamily = new FontFamily("Courier New");

      string[] cultureStrings= {"nl-NL", "en", "en-US", "fr-FR", 
                                "de-DE", "ru-RU", "sr-Cyrl-CS",  
                                "sr-Latn-CS", "es-MX", "sv-SE"};
      outputBlock.Text += String.Format("{0,-12} {1,-30} {2,-30} {3,-30}\n\n", 
                                        "Culture", "DisplayName", "NativeName", 
                                        "EnglishName"); 
      foreach (string cultureString in cultureStrings)
      {
         try {
            CultureInfo ci = new CultureInfo(cultureString);
            outputBlock.Text += String.Format("{0,-12} {1,-30} {2,-30} {3,-30}\n", 
                                              cultureString + ":", ci.DisplayName, 
                                              ci.NativeName, ci.EnglishName);
         }
         catch (ArgumentException) {
            outputBlock.Text += String.Format("Unable to create the {0} culture.\n", cultureString);
         }
      }                                        
   }
}
// The example displays the following output:
//    Culture      DisplayName                    NativeName                     EnglishName                   
//    
//    nl-NL:       Dutch (Netherlands)            Nederlands (Nederland)         Dutch (Netherlands)           
//    en:          English                        English                        English                       
//    en-US:       English (United States)        English (United States)        English (United States)       
//    fr-FR:       French (France)                français (France)              French (France)               
//    de-DE:       German (Germany)               Deutsch (Deutschland)          German (Germany)              
//    ru-RU:       Russian (Russia)               русский (Россия)               Russian (Russia)              
//    sr-Cyrl-CS:  Serbian (Cyrillic, Serbia)     српски (Србија)                Serbian (Cyrillic, Serbia)    
//    sr-Latn-CS:  Serbian (Latin, Serbia)        srpski (Srbija)                Serbian (Latin, Serbia)       
//    es-MX:       Spanish (Mexico)               Español (México)               Spanish (Mexico)              
//    sv-SE:       Swedish (Sweden)               svenska (Sverige)              Swedish (Sweden)              


Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2014 Microsoft