CultureInfo.Name 속성
정의
languagecode2-country/regioncode2 형식의 문화권 이름을 가져옵니다.Gets the culture name in the format languagecode2-country/regioncode2.
public:
virtual property System::String ^ Name { System::String ^ get(); };
public virtual string Name { get; }
member this.Name : string
Public Overridable ReadOnly Property Name As String
속성 값
- 현재이 문화권에 따라 달라 지는 경우 languagecode2 country/regioncode2 형식의 문화권 이름 CultureInfo 이거나, 고정 문화권 인 경우 빈 문자열입니다.The culture name in the format languagecode2-country/regioncode2, if the current CultureInfo is culture-dependent; or an empty string, if it's an invariant culture. languagecode2 는 ISO 639-1에서 파생된 2개의 소문자로 된 코드입니다.languagecode2 is a lowercase two-letter code derived from ISO 639-1. country/regioncode2 가 ISO 3166에서 파생되며 일반적으로 두 개의 대문자 또는 BCP-47 언어 태그로 구성되어 있습니다.country/regioncode2 is derived from ISO 3166 and usually consists of two uppercase letters, or a BCP-47 language tag.
예제
다음 코드 예제에서는 중립 문화권의 여러 속성을 표시 합니다.The following code example displays several properties of the neutral cultures.
참고
이 예제에서는 0x0004 및 0x7C04 문화권 식별자를 사용 하 여 이전 zh-cn 및 zh-cn CHT culture 이름을 각각 표시 합니다.The example displays the older zh-CHS and zh-CHT culture names 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
설명
Windows 시스템에서 속성이 반환할 수 있는 미리 정의 된 문화권 이름 및 식별자 목록은 Name windows에서 지 원하는 언어/지역 이름 목록의 언어 태그 열을 참조 하세요.For a list of predefined culture names and identifiers that the Name property can return on Windows systems, see the Language tag column in the list of language/region names supported by Windows. 문화권 이름은 BCP 47에 정의된 표준을 따릅니다.Culture names follow the standard defined by BCP 47. 또한 Windows 10부터는 name
유효한 모든 BCP-47 언어 태그를 사용할 수 있습니다.In addition, starting with Windows 10, name
can be any valid BCP-47 language tag. 문화권 이름은 변경 될 수 있으며 사용자 지정 문화권의 이름도 반영할 수 있습니다.Note that culture names are subject to change, and that they also can reflect the names of custom cultures.
CultureInfo.Name속성은 클래스 항목에 제공 된 명명 표준을 따릅니다 CultureInfo .The CultureInfo.Name property follows the naming standards provided in the CultureInfo class topic. 대체 정렬 순서의 표시를 제외 하 고 문화권 이름의 약식을 반환 합니다.It returns the short form of the culture name that excludes any indication of an alternate sort order. 예를 들어 CultureInfo 문자열 "DE_phoneb 해제"를 사용 하 여 대체 정렬 순서를 반영 하 여 개체를 인스턴스화하는 경우 Name 속성은 "de"를 반환 합니다.For example, if you instantiate a CultureInfo object by using the string "de-DE_phoneb" to reflect an alternate sort order, the Name property returns "de-DE".
문화권의 전체 이름을 가져오려면 DisplayName , 또는 속성을 사용 해야 합니다 EnglishName NativeName .To get the full name of the culture, you should use the DisplayName, EnglishName, or NativeName property.