CultureInfo.DisplayName 속성
해당 언어 버전의 .NET Framework에서는 culture 이름을 "<languagefull> (<country/regionfull>)" 형식으로 가져옵니다.
네임스페이스: System.Globalization
어셈블리: mscorlib(mscorlib.dll)
구문
‘선언
Public Overridable ReadOnly Property DisplayName As String
‘사용 방법
Dim instance As CultureInfo
Dim value As String
value = instance.DisplayName
public virtual string DisplayName { get; }
public:
virtual property String^ DisplayName {
String^ get ();
}
/** @property */
public String get_DisplayName ()
public function get DisplayName () : String
속성 값
해당 언어 버전의 .NET Framework에서 "<languagefull> (<country/regionfull>)" 형식으로 표시되는 culture 이름입니다. 여기서 <languagefull>은 해당 언어의 전체 이름이고, <country/regionfull>은 해당 국가/지역의 전체 이름입니다.
설명
예를 들어, 영어 버전의 .NET Framework가 설치되어 있는 경우 en-US (영어-미국) culture의 DisplayName 속성은 "English(United States)"을 반환합니다. 스페인어 버전의 .NET Framework가 설치되어 있는 경우 시스템에서 표시용으로 설정된 언어에 상관없이 culture 이름이 스페인어로 표시되므로 en-US culture의 DisplayName 속성은 "Ingles(Estados Unidos)"를 반환합니다.
CultureAndRegionInfoBuilder 클래스를 통해 사용자 지정 culture가 만들어지는 경우 DisplayName 속성은 NativeName 속성 값으로 초기화됩니다.
예제
다음 코드 예제에서는 중립 culture의 여러 가지 속성을 표시합니다.
Imports System
Imports System.Globalization
Public Class SamplesCultureInfo
Public Shared 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
End Class 'SamplesCultureInfo
'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-CHS zh zho CHS Chinese (Simplified) Chinese (Simplified)
'zh-CHT zh zho CHT Chinese (Traditional) Chinese (Traditional)
'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
using System;
using System.Globalization;
public class SamplesCultureInfo {
public static void Main() {
// Displays several properties of the neutral cultures.
Console.WriteLine( "CULTURE ISO ISO WIN DISPLAYNAME ENGLISHNAME" );
foreach ( CultureInfo 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 );
}
}
}
/*
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-CHS zh zho CHS Chinese (Simplified) Chinese (Simplified)
zh-CHT zh zho CHT Chinese (Traditional) Chinese (Traditional)
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
*/
using namespace System;
using namespace System::Globalization;
int main()
{
// Displays several properties of the neutral cultures.
Console::WriteLine( "CULTURE ISO ISO WIN DISPLAYNAME ENGLISHNAME" );
System::Collections::IEnumerator^ enum0 = CultureInfo::GetCultures( CultureTypes::NeutralCultures )->GetEnumerator();
while ( enum0->MoveNext() )
{
CultureInfo^ ci = safe_cast<CultureInfo^>(enum0->Current);
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 );
}
}
/*
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-CHS zh zho CHS Chinese (Simplified) Chinese (Simplified)
zh-CHT zh zho CHT Chinese (Traditional) Chinese (Traditional)
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
*/
import System.* ;
import System.Globalization.* ;
public class SamplesCultureInfo
{
public static void main(String[] args)
{
// Displays several properties of the neutral cultures.
Console.WriteLine("CULTURE ISO ISO WIN DISPLAYNAME "
+ " ENGLISHNAME");
for (int iCtr = 0;
iCtr < (CultureInfo.GetCultures(CultureTypes.NeutralCultures).
length); iCtr++) {
CultureInfo ci =
CultureInfo.GetCultures(CultureTypes.NeutralCultures)[iCtr];
Console.Write("{0,-7}", ci.get_Name());
Console.Write(" {0,-3}", ci.get_TwoLetterISOLanguageName());
Console.Write(" {0,-3}", ci.get_ThreeLetterISOLanguageName());
Console.Write(" {0,-3}", ci.get_ThreeLetterWindowsLanguageName());
Console.Write(" {0,-40}", ci.get_DisplayName());
Console.WriteLine(" {0,-40}", ci.get_EnglishName());
}
} //main
} //SamplesCultureInfo
/*
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-CHS zh zho CHS Chinese (Simplified) Chinese
(Simplified)
zh-CHT zh zho CHT Chinese (Traditional) Chinese
(Traditional)
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
*/
플랫폼
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
.NET Framework에서 모든 플래폼의 모든 버전을 지원하지는 않습니다. 지원되는 버전의 목록은 시스템 요구 사항을 참조하십시오.
버전 정보
.NET Framework
2.0, 1.1, 1.0에서 지원
참고 항목
참조
CultureInfo 클래스
CultureInfo 멤버
System.Globalization 네임스페이스
Name
NativeName
EnglishName
TwoLetterISOLanguageName
ThreeLetterISOLanguageName
ThreeLetterWindowsLanguageName