CultureInfo.DisplayName 속성
정의
전체 지역화된 문화 이름을 가져옵니다.Gets the full localized culture name.
public:
virtual property System::String ^ DisplayName { System::String ^ get(); };
public virtual string DisplayName { get; }
member this.DisplayName : string
Public Overridable ReadOnly Property DisplayName As String
속성 값
languagefull [country/regionfull] 형식으로 표시된 완전 지역화된 문화권 이름입니다. 여기서 languagefull 은 해당 언어의 전체 이름이고, country/regionfull 은 해당 국가/지역의 전체 이름입니다.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.
예제
다음 코드 예제에서는 중립 문화권의 여러 속성을 표시 합니다.The following code example displays several properties of the neutral cultures.
참고
이 예제에서는 0x0004 및 0x7C04 문화권 식별자를 사용 하 여 zh-cn 및 zh-cn-CHT culture를 각각 표시 합니다.The example displays the zh-CHS and zh-CHT cultures with the 0x0004 and 0x7C04 culture identifiers, respectively. 그러나 Windows Vista 애플리케이션 대신 ZH-CHT 대신 Zh-hant 이름과 ZH-CHS Zh-hans 이름을 사용 해야 합니다.However, your Windows Vista applications should use the zh-Hans name instead of zh-CHS and the zh-Hant name instead of zh-CHT. Zh-cn-Hans 및 zh-cn-Zh-hant 이름은 현재 표준을 나타내며 이전 이름을 사용 해야 하는 이유가 없으면 사용 해야 합니다.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.
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-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
*/
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-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
*/
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
'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
설명
이 속성은 개체의 지역화 된 이름을 나타냅니다 CultureInfo .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.
클래스를 사용 하 여 사용자 지정 문화권을 만드는 경우 속성은 CultureAndRegionInfoBuilder DisplayName 속성의 값으로 초기화 됩니다 NativeName .If a custom culture is created by means of the CultureAndRegionInfoBuilder class, the DisplayName property is initialized to the value of the NativeName property.