CultureAndRegionModifiers 열거형
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
CultureAndRegionInfoBuilder 개체를 정의하는 상수를 지정합니다.
이 열거형은 멤버 값의 비트 조합을 지원합니다.
public enum class CultureAndRegionModifiers
[System.Flags]
public enum CultureAndRegionModifiers
[<System.Flags>]
type CultureAndRegionModifiers =
Public Enum CultureAndRegionModifiers
- 상속
- 특성
필드
Neutral | 1 | 중립 사용자 지정 문화권입니다. |
None | 0 | 특정 추가 사용자 지정 문화권입니다. |
Replacement | 2 | 기존 .NET 문화권 또는 Windows 로캘을 대체하는 사용자 지정 문화권입니다. |
예제
다음 코드 예제에서는 프라이빗 사용 접두사를 사용하여 사용자 지정 문화권을 만든 다음 해당 속성 집합을 보여 줍니다. 첫 번째 속성에는 문화권의 이름입니다.
// This example demonstrates a System.Globalization.Culture-
// AndRegionInfoBuilder constructor and some of the properties
// of a custom culture object created with the constructor.
#using <sysglobl.dll>
using namespace System;
using namespace System::Globalization;
int main()
{
CultureAndRegionInfoBuilder^ builder =
gcnew CultureAndRegionInfoBuilder
("x-en-US-sample", CultureAndRegionModifiers::None);
// Display some of the properties
// for the en-US culture.
Console::WriteLine("CultureName:. . . . . . . . . . {0}",
builder->CultureName);
Console::WriteLine("CultureEnglishName: . . . . . . {0}",
builder->CultureEnglishName);
Console::WriteLine("CultureNativeName:. . . . . . . {0}",
builder->CultureNativeName);
Console::WriteLine("GeoId:. . . . . . . . . . . . . {0}",
builder->GeoId);
Console::WriteLine("IsMetric: . . . . . . . . . . . {0}",
builder->IsMetric);
Console::WriteLine("ISOCurrencySymbol:. . . . . . . {0}",
builder->ISOCurrencySymbol);
Console::WriteLine("RegionEnglishName:. . . . . . . {0}",
builder->RegionEnglishName);
Console::WriteLine("RegionName: . . . . . . . . . . {0}",
builder->RegionName);
Console::WriteLine("RegionNativeName: . . . . . . . {0}",
builder->RegionNativeName);
Console::WriteLine("ThreeLetterISOLanguageName: . . {0}",
builder->ThreeLetterISOLanguageName);
Console::WriteLine("ThreeLetterISORegionName: . . . {0}",
builder->ThreeLetterISORegionName);
Console::WriteLine("ThreeLetterWindowsLanguageName: {0}",
builder->ThreeLetterWindowsLanguageName);
Console::WriteLine("ThreeLetterWindowsRegionName: . {0}",
builder->ThreeLetterWindowsRegionName);
Console::WriteLine("TwoLetterISOLanguageName: . . . {0}",
builder->TwoLetterISOLanguageName);
Console::WriteLine("TwoLetterISORegionName: . . . . {0}",
builder->TwoLetterISORegionName);
}
/*
This code example produces the following results:
CultureName:. . . . . . . . . . en-US
CultureEnglishName: . . . . . . English (United States)
CultureNativeName:. . . . . . . English (United States)
GeoId:. . . . . . . . . . . . . 244
IsMetric: . . . . . . . . . . . False
ISOCurrencySymbol:. . . . . . . USD
RegionEnglishName:. . . . . . . United States
RegionName: . . . . . . . . . . US
RegionNativeName: . . . . . . . United States
ThreeLetterISOLanguageName: . . eng
ThreeLetterISORegionName: . . . USA
ThreeLetterWindowsLanguageName: ENU
ThreeLetterWindowsRegionName: . USA
TwoLetterISOLanguageName: . . . en
TwoLetterISORegionName: . . . . US
*/
// This example demonstrates a System.Globalization.Culture-
// AndRegionInfoBuilder constructor and some of the properties
// of the CultureAndRegionInfoBuilder object that is created.
// Compile this example with a reference to sysglobl.dll.
using System;
using System.Globalization;
class Sample
{
public static void Main()
{
// Construct a new, privately used culture that extends the en-US culture
// provided by the .NET Framework. In this sample, the CultureAndRegion-
// Types.Specific parameter creates a minimal CultureAndRegionInfoBuilder
// object that you must populate with culture and region information.
CultureAndRegionInfoBuilder cib = null;
try {
cib = new CultureAndRegionInfoBuilder(
"x-en-US-sample",
CultureAndRegionModifiers.None);
}
catch (ArgumentException ae)
{
Console.WriteLine(ae);
return;
}
// Populate the new CultureAndRegionInfoBuilder object with culture information.
CultureInfo ci = new CultureInfo("en-US");
cib.LoadDataFromCultureInfo(ci);
// Populate the new CultureAndRegionInfoBuilder object with region information.
RegionInfo ri = new RegionInfo("US");
cib.LoadDataFromRegionInfo(ri);
// Display some of the properties for the x-en-US-sample custom culture.
Console.Clear();
Console.WriteLine("CultureName:. . . . . . . . . . {0}", cib.CultureName);
Console.WriteLine("CultureEnglishName: . . . . . . {0}", cib.CultureEnglishName);
Console.WriteLine("CultureNativeName:. . . . . . . {0}", cib.CultureNativeName);
Console.WriteLine("GeoId:. . . . . . . . . . . . . {0}", cib.GeoId);
Console.WriteLine("IsMetric: . . . . . . . . . . . {0}", cib.IsMetric);
Console.WriteLine("ISOCurrencySymbol:. . . . . . . {0}", cib.ISOCurrencySymbol);
Console.WriteLine("RegionEnglishName:. . . . . . . {0}", cib.RegionEnglishName);
Console.WriteLine("RegionName: . . . . . . . . . . {0}", cib.RegionName);
Console.WriteLine("RegionNativeName: . . . . . . . {0}", cib.RegionNativeName);
Console.WriteLine("ThreeLetterISOLanguageName: . . {0}", cib.ThreeLetterISOLanguageName);
Console.WriteLine("ThreeLetterISORegionName: . . . {0}", cib.ThreeLetterISORegionName);
Console.WriteLine("ThreeLetterWindowsLanguageName: {0}", cib.ThreeLetterWindowsLanguageName);
Console.WriteLine("ThreeLetterWindowsRegionName: . {0}", cib.ThreeLetterWindowsRegionName);
Console.WriteLine("TwoLetterISOLanguageName: . . . {0}", cib.TwoLetterISOLanguageName);
Console.WriteLine("TwoLetterISORegionName: . . . . {0}", cib.TwoLetterISORegionName);
}
}
/*
This code example produces the following results:
CultureName:. . . . . . . . . . x-en-US-sample
CultureEnglishName: . . . . . . English
CultureNativeName:. . . . . . . English
GeoId:. . . . . . . . . . . . . 244
IsMetric: . . . . . . . . . . . False
ISOCurrencySymbol:. . . . . . . USD
RegionEnglishName:. . . . . . . United States
RegionName: . . . . . . . . . . US
RegionNativeName: . . . . . . . United States
ThreeLetterISOLanguageName: . . eng
ThreeLetterISORegionName: . . . USA
ThreeLetterWindowsLanguageName: ENU
ThreeLetterWindowsRegionName: . USA
TwoLetterISOLanguageName: . . . en
TwoLetterISORegionName: . . . . US
*/
' This example demonstrates a System.Globalization.Culture-
' AndRegionInfoBuilder constructor and some of the properties
' of the CultureAndRegionInfoBuilder object that is created.
' Compile this example with a reference to sysglobl.dll.
Imports System.Globalization
Class Sample
Public Shared Sub Main()
' Construct a new, privately used culture that extends the en-US culture
' provided by the .NET Framework. In this sample, the CultureAndRegion-
' Types.Specific parameter creates a minimal CultureAndRegionInfoBuilder
' object that you must populate with culture and region information.
Dim cib As CultureAndRegionInfoBuilder = Nothing
Try
cib = New CultureAndRegionInfoBuilder("x-en-US-sample", _
CultureAndRegionModifiers.None)
Catch ae As ArgumentException
Console.WriteLine(ae)
Return
End Try
' Populate the new CultureAndRegionInfoBuilder object with culture information.
Dim ci As New CultureInfo("en-US")
cib.LoadDataFromCultureInfo(ci)
' Populate the new CultureAndRegionInfoBuilder object with region information.
Dim ri As New RegionInfo("US")
cib.LoadDataFromRegionInfo(ri)
' Display some of the properties for the x-en-US-sample custom culture.
Console.Clear()
Console.WriteLine("CultureName:. . . . . . . . . . {0}", cib.CultureName)
Console.WriteLine("CultureEnglishName: . . . . . . {0}", cib.CultureEnglishName)
Console.WriteLine("CultureNativeName:. . . . . . . {0}", cib.CultureNativeName)
Console.WriteLine("GeoId:. . . . . . . . . . . . . {0}", cib.GeoId)
Console.WriteLine("IsMetric: . . . . . . . . . . . {0}", cib.IsMetric)
Console.WriteLine("ISOCurrencySymbol:. . . . . . . {0}", cib.ISOCurrencySymbol)
Console.WriteLine("RegionEnglishName:. . . . . . . {0}", cib.RegionEnglishName)
Console.WriteLine("RegionName: . . . . . . . . . . {0}", cib.RegionName)
Console.WriteLine("RegionNativeName: . . . . . . . {0}", cib.RegionNativeName)
Console.WriteLine("ThreeLetterISOLanguageName: . . {0}", cib.ThreeLetterISOLanguageName)
Console.WriteLine("ThreeLetterISORegionName: . . . {0}", cib.ThreeLetterISORegionName)
Console.WriteLine("ThreeLetterWindowsLanguageName: {0}", cib.ThreeLetterWindowsLanguageName)
Console.WriteLine("ThreeLetterWindowsRegionName: . {0}", cib.ThreeLetterWindowsRegionName)
Console.WriteLine("TwoLetterISOLanguageName: . . . {0}", cib.TwoLetterISOLanguageName)
Console.WriteLine("TwoLetterISORegionName: . . . . {0}", cib.TwoLetterISORegionName)
End Sub
End Class
'
'This code example produces the following results:
'
'CultureName:. . . . . . . . . . x-en-US-sample
'CultureEnglishName: . . . . . . English
'CultureNativeName:. . . . . . . English
'GeoId:. . . . . . . . . . . . . 244
'IsMetric: . . . . . . . . . . . False
'ISOCurrencySymbol:. . . . . . . USD
'RegionEnglishName:. . . . . . . United States
'RegionName: . . . . . . . . . . US
'RegionNativeName: . . . . . . . United States
'ThreeLetterISOLanguageName: . . eng
'ThreeLetterISORegionName: . . . USA
'ThreeLetterWindowsLanguageName: ENU
'ThreeLetterWindowsRegionName: . USA
'TwoLetterISOLanguageName: . . . en
'TwoLetterISORegionName: . . . . US
'
설명
하나 이상의 비트 조합 지정 CultureAndRegionModifiers 값에 대 한 인수로 CultureAndRegionInfoBuilder.CultureAndRegionInfoBuilder(String, CultureAndRegionModifiers) 생성자입니다. 결과 사용 하면 CultureAndRegionInfoBuilder 사용자 지정 culture를 만들 개체입니다.
사용자 지정 문화권에는 이러한 특성의 조합을 포함할 수 있습니다.
사용자 지정 culture는 특정 문화권 또는 중립 문화권 수 있습니다.
특정 문화권 중립 문화권 없는 지역 언어를 지정 하는 동안 언어 및 지역을 지정 합니다.
사용자 지정 culture는 대체 문화권 또는 추가 문화권 수 있습니다.
대체 문화권.NET Framework 또는 Windows와 함께 제공 되는 로캘을 사용 하 여 제공 되는 문화권을 대체 합니다.
추가 culture는 대체 문화권 이외의 항목. 추가 문화권 완전히 새로운 또는 기존.NET Framework 문화권 또는 Windows 로캘을 확장할 수 있습니다.
중요
CultureAndRegionModifiers sysglobl.dll 이라는 어셈블리가 있는 열거형입니다. 성공적으로이 형식을 사용 하는 코드를 컴파일할 sysglobl.dll에 대 한 참조 추가 해야 합니다.
적용 대상
추가 정보
.NET