CultureInfo.LCID 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
현재 CultureInfo에 대한 문화권 식별자를 가져옵니다.
public:
virtual property int LCID { int get(); };
public virtual int LCID { get; }
member this.LCID : int
Public Overridable ReadOnly Property LCID As Integer
속성 값
현재 CultureInfo에 대한 문화권 식별자입니다.
예제
다음 코드 예제에서는 국제 정렬 순서를 사용 하 고 다른 CultureInfo 기존 정렬 순서를 사용 하 고 스페인어 (스페인)에 대 한 만드는 CultureInfo 방법을 보여 줍니다.
using namespace System;
using namespace System::Collections;
using namespace System::Globalization;
int main()
{
// Creates and initializes the CultureInfo which uses the international sort.
CultureInfo^ myCIintl = gcnew CultureInfo( "es-ES",false );
// Creates and initializes the CultureInfo which uses the traditional sort.
CultureInfo^ myCItrad = gcnew CultureInfo( 0x040A,false );
// Displays the properties of each culture.
Console::WriteLine( "{0,-31}{1,-47}{2,-25}", "PROPERTY", "INTERNATIONAL", "TRADITIONAL" );
Console::WriteLine( "{0,-31}{1,-47}{2,-25}", "CompareInfo", myCIintl->CompareInfo, myCItrad->CompareInfo );
Console::WriteLine( "{0,-31}{1,-47}{2,-25}", "DisplayName", myCIintl->DisplayName, myCItrad->DisplayName );
Console::WriteLine( "{0,-31}{1,-47}{2,-25}", "EnglishName", myCIintl->EnglishName, myCItrad->EnglishName );
Console::WriteLine( "{0,-31}{1,-47}{2,-25}", "IsNeutralCulture", myCIintl->IsNeutralCulture, myCItrad->IsNeutralCulture );
Console::WriteLine( "{0,-31}{1,-47}{2,-25}", "IsReadOnly", myCIintl->IsReadOnly, myCItrad->IsReadOnly );
Console::WriteLine( "{0,-31}{1,-47}{2,-25}", "LCID", myCIintl->LCID, myCItrad->LCID );
Console::WriteLine( "{0,-31}{1,-47}{2,-25}", "Name", myCIintl->Name, myCItrad->Name );
Console::WriteLine( "{0,-31}{1,-47}{2,-25}", "NativeName", myCIintl->NativeName, myCItrad->NativeName );
Console::WriteLine( "{0,-31}{1,-47}{2,-25}", "Parent", myCIintl->Parent, myCItrad->Parent );
Console::WriteLine( "{0,-31}{1,-47}{2,-25}", "TextInfo", myCIintl->TextInfo, myCItrad->TextInfo );
Console::WriteLine( "{0,-31}{1,-47}{2,-25}", "ThreeLetterISOLanguageName", myCIintl->ThreeLetterISOLanguageName, myCItrad->ThreeLetterISOLanguageName );
Console::WriteLine( "{0,-31}{1,-47}{2,-25}", "ThreeLetterWindowsLanguageName", myCIintl->ThreeLetterWindowsLanguageName, myCItrad->ThreeLetterWindowsLanguageName );
Console::WriteLine( "{0,-31}{1,-47}{2,-25}", "TwoLetterISOLanguageName", myCIintl->TwoLetterISOLanguageName, myCItrad->TwoLetterISOLanguageName );
Console::WriteLine();
// Compare two strings using myCIintl ->
Console::WriteLine( "Comparing \"llegar\" and \"lugar\"" );
Console::WriteLine( " With myCIintl -> CompareInfo -> Compare: {0}", myCIintl->CompareInfo->Compare( "llegar", "lugar" ) );
Console::WriteLine( " With myCItrad -> CompareInfo -> Compare: {0}", myCItrad->CompareInfo->Compare( "llegar", "lugar" ) );
}
/*
This code produces the following output.
PROPERTY INTERNATIONAL TRADITIONAL
CompareInfo CompareInfo - es-ES CompareInfo - es-ES_tradnl
DisplayName Spanish (Spain) Spanish (Spain)
EnglishName Spanish (Spain, International Sort) Spanish (Spain, Traditional Sort)
IsNeutralCulture False False
IsReadOnly False False
LCID 3082 1034
Name es-ES es-ES
NativeName Español (España, alfabetización internacional) Español (España, alfabetización tradicional)
Parent es es
TextInfo TextInfo - es-ES TextInfo - es-ES_tradnl
ThreeLetterISOLanguageName spa spa
ThreeLetterWindowsLanguageName ESN ESP
TwoLetterISOLanguageName es es
Comparing "llegar" and "lugar"
With myCIintl -> CompareInfo -> Compare: -1
With myCItrad -> CompareInfo -> Compare: 1
*/
using System;
using System.Globalization;
public class SamplesCultureInfo
{
public static void Main()
{
// Creates and initializes the CultureInfo which uses the international sort.
CultureInfo myCIintl = new CultureInfo("es-ES", false);
// Creates and initializes the CultureInfo which uses the traditional sort.
CultureInfo myCItrad = new CultureInfo(0x040A, false);
// Displays the properties of each culture.
Console.WriteLine("{0,-31}{1,-47}{2,-25}", "PROPERTY", "INTERNATIONAL", "TRADITIONAL");
Console.WriteLine("{0,-31}{1,-47}{2,-25}", "CompareInfo", myCIintl.CompareInfo, myCItrad.CompareInfo);
Console.WriteLine("{0,-31}{1,-47}{2,-25}", "DisplayName", myCIintl.DisplayName, myCItrad.DisplayName);
Console.WriteLine("{0,-31}{1,-47}{2,-25}", "EnglishName", myCIintl.EnglishName, myCItrad.EnglishName);
Console.WriteLine("{0,-31}{1,-47}{2,-25}", "IsNeutralCulture", myCIintl.IsNeutralCulture, myCItrad.IsNeutralCulture);
Console.WriteLine("{0,-31}{1,-47}{2,-25}", "IsReadOnly", myCIintl.IsReadOnly, myCItrad.IsReadOnly);
Console.WriteLine("{0,-31}{1,-47}{2,-25}", "LCID", myCIintl.LCID, myCItrad.LCID);
Console.WriteLine("{0,-31}{1,-47}{2,-25}", "Name", myCIintl.Name, myCItrad.Name);
Console.WriteLine("{0,-31}{1,-47}{2,-25}", "NativeName", myCIintl.NativeName, myCItrad.NativeName);
Console.WriteLine("{0,-31}{1,-47}{2,-25}", "Parent", myCIintl.Parent, myCItrad.Parent);
Console.WriteLine("{0,-31}{1,-47}{2,-25}", "TextInfo", myCIintl.TextInfo, myCItrad.TextInfo);
Console.WriteLine("{0,-31}{1,-47}{2,-25}", "ThreeLetterISOLanguageName", myCIintl.ThreeLetterISOLanguageName, myCItrad.ThreeLetterISOLanguageName);
Console.WriteLine("{0,-31}{1,-47}{2,-25}", "ThreeLetterWindowsLanguageName", myCIintl.ThreeLetterWindowsLanguageName, myCItrad.ThreeLetterWindowsLanguageName);
Console.WriteLine("{0,-31}{1,-47}{2,-25}", "TwoLetterISOLanguageName", myCIintl.TwoLetterISOLanguageName, myCItrad.TwoLetterISOLanguageName);
Console.WriteLine();
// Compare two strings using myCIintl.
Console.WriteLine("Comparing \"llegar\" and \"lugar\"");
Console.WriteLine(" With myCIintl.CompareInfo.Compare: {0}", myCIintl.CompareInfo.Compare("llegar", "lugar"));
Console.WriteLine(" With myCItrad.CompareInfo.Compare: {0}", myCItrad.CompareInfo.Compare("llegar", "lugar"));
}
}
/*
This code produces the following output.
PROPERTY INTERNATIONAL TRADITIONAL
CompareInfo CompareInfo - es-ES CompareInfo - es-ES_tradnl
DisplayName Spanish (Spain) Spanish (Spain)
EnglishName Spanish (Spain, International Sort) Spanish (Spain, Traditional Sort)
IsNeutralCulture False False
IsReadOnly False False
LCID 3082 1034
Name es-ES es-ES
NativeName Español (España, alfabetización internacional) Español (España, alfabetización tradicional)
Parent es es
TextInfo TextInfo - es-ES TextInfo - es-ES_tradnl
ThreeLetterISOLanguageName spa spa
ThreeLetterWindowsLanguageName ESN ESP
TwoLetterISOLanguageName es es
Comparing "llegar" and "lugar"
With myCIintl.CompareInfo.Compare: -1
With myCItrad.CompareInfo.Compare: 1
*/
Imports System.Collections
Imports System.Globalization
Module Module1
Public Sub Main()
' Creates and initializes the CultureInfo which uses the international sort.
Dim myCIintl As New CultureInfo("es-ES", False)
' Creates and initializes the CultureInfo which uses the traditional sort.
Dim myCItrad As New CultureInfo(&H40A, False)
' Displays the properties of each culture.
Console.WriteLine("{0,-31}{1,-47}{2,-25}", "PROPERTY", "INTERNATIONAL", "TRADITIONAL")
Console.WriteLine("{0,-31}{1,-47}{2,-25}", "CompareInfo", myCIintl.CompareInfo, myCItrad.CompareInfo)
Console.WriteLine("{0,-31}{1,-47}{2,-25}", "DisplayName", myCIintl.DisplayName, myCItrad.DisplayName)
Console.WriteLine("{0,-31}{1,-47}{2,-25}", "EnglishName", myCIintl.EnglishName, myCItrad.EnglishName)
Console.WriteLine("{0,-31}{1,-47}{2,-25}", "IsNeutralCulture", myCIintl.IsNeutralCulture, myCItrad.IsNeutralCulture)
Console.WriteLine("{0,-31}{1,-47}{2,-25}", "IsReadOnly", myCIintl.IsReadOnly, myCItrad.IsReadOnly)
Console.WriteLine("{0,-31}{1,-47}{2,-25}", "LCID", myCIintl.LCID, myCItrad.LCID)
Console.WriteLine("{0,-31}{1,-47}{2,-25}", "Name", myCIintl.Name, myCItrad.Name)
Console.WriteLine("{0,-31}{1,-47}{2,-25}", "NativeName", myCIintl.NativeName, myCItrad.NativeName)
Console.WriteLine("{0,-31}{1,-47}{2,-25}", "Parent", myCIintl.Parent, myCItrad.Parent)
Console.WriteLine("{0,-31}{1,-47}{2,-25}", "TextInfo", myCIintl.TextInfo, myCItrad.TextInfo)
Console.WriteLine("{0,-31}{1,-47}{2,-25}", "ThreeLetterISOLanguageName", myCIintl.ThreeLetterISOLanguageName, myCItrad.ThreeLetterISOLanguageName)
Console.WriteLine("{0,-31}{1,-47}{2,-25}", "ThreeLetterWindowsLanguageName", myCIintl.ThreeLetterWindowsLanguageName, myCItrad.ThreeLetterWindowsLanguageName)
Console.WriteLine("{0,-31}{1,-47}{2,-25}", "TwoLetterISOLanguageName", myCIintl.TwoLetterISOLanguageName, myCItrad.TwoLetterISOLanguageName)
Console.WriteLine()
' Compare two strings using myCIintl.
Console.WriteLine("Comparing ""llegar"" and ""lugar""")
Console.WriteLine(" With myCIintl.CompareInfo.Compare: {0}", myCIintl.CompareInfo.Compare("llegar", "lugar"))
Console.WriteLine(" With myCItrad.CompareInfo.Compare: {0}", myCItrad.CompareInfo.Compare("llegar", "lugar"))
End Sub
'This code produces the following output.
'
'PROPERTY INTERNATIONAL TRADITIONAL
'CompareInfo CompareInfo - es-ES CompareInfo - es-ES_tradnl
'DisplayName Spanish (Spain) Spanish (Spain)
'EnglishName Spanish (Spain, International Sort) Spanish (Spain, Traditional Sort)
'IsNeutralCulture False False
'IsReadOnly False False
'LCID 3082 1034
'Name es-ES es-ES
'NativeName Español (España, alfabetización internacional) Español (España, alfabetización tradicional)
'Parent es es
'TextInfo TextInfo - es-ES TextInfo - es-ES_tradnl
'ThreeLetterISOLanguageName spa spa
'ThreeLetterWindowsLanguageName ESN ESP
'TwoLetterISOLanguageName es es
'
'Comparing "llegar" and "lugar"
' With myCIintl.CompareInfo.Compare: -1
' With myCItrad.CompareInfo.Compare: 1
End Module
설명
대부분의 경우 문화권 식별자는 해당 NLS 로캘 식별자에 매핑됩니다.
Windows 10 이전 버전의 Windows에서는 로캘 식별자 LOCALE_CUSTOM_UNSPECIFIED
(0x1000 또는 4096)가 사용자가 만든 사용자 지정 문화권에 할당됩니다. Windows 10 시작하여 고유한 로캘 식별자가 없는 모든 문화권에 할당되며 전체 시스템 제공 데이터가 없습니다. 따라서 문화권을 반복하고 값 LOCALE_CUSTOM_UNSPECIFIED
이 인 코드를 검색 LCID 하는 코드는 Windows 10 따라 실행되는 경우 개체의 CultureInfo 더 큰 하위 집합을 반환합니다.
적용 대상
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET