Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

CultureInfo.DisplayName Property

Gets the full localized culture name.

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

'Declaration
Public Overridable ReadOnly Property DisplayName As String

Property Value

Type: System.String
The full localized culture name in the format languagefull [country/regionfull], where languagefull is the full name of the language and country/regionfull is the full name of the country/region.

This property represents the localized name of the CultureInfo object.

Culture names may vary due to scripting or formatting conventions. You should use the returned name for display, and not attempt to parse it.

If a custom culture is created by means of the CultureAndRegionInfoBuilder class, the DisplayName property is initialized to the value of the NativeName property.

The following code example displays several properties of the neutral cultures.

NoteNote

The example displays the zh-CHS and zh-CHT cultures with the 0x0004 and 0x7C04 culture identifiers, respectively. However, your Windows Vista applications should use the zh-Hans name instead of zh-CHS and the zh-Hant name instead of zh-CHT. The zh-Hans and zh-Hant names represent the current standard, and should be used unless you have a reason for using the older names.

Imports System
Imports System.Globalization

Module Module1

   Public Sub Main()

      ' Displays several properties of the neutral cultures.
      Console.WriteLine("CULTURE ISO ISO WIN DISPLAYNAME                              ENGLISHNAME")
      Dim ci As CultureInfo
      For Each ci In CultureInfo.GetCultures(CultureTypes.NeutralCultures)
         Console.Write("{0,-7}", ci.Name)
         Console.Write(" {0,-3}", ci.TwoLetterISOLanguageName)
         Console.Write(" {0,-3}", ci.ThreeLetterISOLanguageName)
         Console.Write(" {0,-3}", ci.ThreeLetterWindowsLanguageName)
         Console.Write(" {0,-40}", ci.DisplayName)
         Console.WriteLine(" {0,-40}", ci.EnglishName)
      Next ci

   End Sub 'Main 



'This code produces the following output.  This output has been cropped for brevity. 

'CULTURE ISO ISO WIN DISPLAYNAME                              ENGLISHNAME 
'ar      ar  ara ARA Arabic                                   Arabic                                   
'bg      bg  bul BGR Bulgarian                                Bulgarian                                
'ca      ca  cat CAT Catalan                                  Catalan                                  
'zh-Hans zh  zho CHS Chinese (Simplified)                     Chinese (Simplified)                     
'cs      cs  ces CSY Czech                                    Czech                                    
'da      da  dan DAN Danish                                   Danish                                   
'de      de  deu DEU German                                   German                                   
'el      el  ell ELL Greek                                    Greek                                    
'en      en  eng ENU English                                  English                                  
'es      es  spa ESP Spanish                                  Spanish                                  
'fi      fi  fin FIN Finnish                                  Finnish                                  
'zh      zh  zho CHS Chinese                                  Chinese                                  
'zh-Hant zh  zho CHT Chinese (Traditional)                    Chinese (Traditional)                    
'zh-CHS  zh  zho CHS Chinese (Simplified) Legacy              Chinese (Simplified) Legacy              
'zh-CHT  zh  zho CHT Chinese (Traditional) Legacy             Chinese (Traditional) Legacy             

End Module

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Portable Class Library

Supported in: Portable Class Library

Supported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

Supported in: Windows Phone Silverlight 8
Show:
© 2015 Microsoft