CultureAndRegionInfoBuilder 클래스

정의

다른 문화권 및 국가/지역을 기반으로 또는 새로 사용자 지정 문화권을 정의합니다. 사용자 지정 문화권을 컴퓨터에 설치하면 이후 해당 컴퓨터에서 실행되는 애플리케이션에서 이 문화권을 사용할 수 있습니다. 이 클래스는 상속될 수 없습니다.

public ref class CultureAndRegionInfoBuilder sealed
[System.Runtime.InteropServices.ComVisible(false)]
public sealed class CultureAndRegionInfoBuilder
[<System.Runtime.InteropServices.ComVisible(false)>]
type CultureAndRegionInfoBuilder = class
Public NotInheritable Class CultureAndRegionInfoBuilder
상속
CultureAndRegionInfoBuilder
특성

예제

다음 예제에서는 미국에서 러시아어 언어를 나타내는 사용자 지정 ru (미국) 문화권을 정의 합니다. 러시아어 (러시아)에서 설정을 로드 하 여 사용자 지정 문화권을 정의 하는 예제 CultureInfo 개체와 미국 RegionInfo 개체를 설정한 다음 다양 한 CultureAndRegionInfoBuilder 속성입니다. 이 예제에서는 사용자 지정 문화권을 등록한 다음 인스턴스화하여 현재 문화권으로 만듭니다.

using System;
using System.Globalization;
using System.Threading;

public class Example
{
   public static void Main()
   {
      // Create a custom culture for ru-US.
      CultureAndRegionInfoBuilder car1 = new CultureAndRegionInfoBuilder("ru-US",
                                             CultureAndRegionModifiers.None);
      car1.LoadDataFromCultureInfo(CultureInfo.CreateSpecificCulture("ru-RU"));
      car1.LoadDataFromRegionInfo(new RegionInfo("en-US"));

      car1.CultureEnglishName = "Russian (United States)";
      car1.CultureNativeName = "русский (США)";
      car1.CurrencyNativeName = "Доллар (США)";
      car1.RegionNativeName = "США";

      // Register the culture.
      try {
         car1.Register();
      }
      catch (InvalidOperationException) {
         // Swallow the exception: the culture already is registered.
      }

      // Use the custom culture.
      CultureInfo ci = CultureInfo.CreateSpecificCulture("ru-US");
      Thread.CurrentThread.CurrentCulture = ci;
      Console.WriteLine("Current Culture: {0}",
                        Thread.CurrentThread.CurrentCulture.Name);
      Console.WriteLine("Writing System: {0}",
                        Thread.CurrentThread.CurrentCulture.TextInfo);
   }
}
// The example displays the following output:
//     Current Culture: ru-US
//     Writing System: TextInfo - ru-US
Imports System.Globalization
Imports System.Threading

Module Example
   Public Sub Main()
      ' Create a custom culture for ru-US.
      Dim car1 As New CultureAndRegionInfoBuilder("ru-US", CultureAndRegionModifiers.None)
      car1.LoadDataFromCultureInfo(CultureInfo.CreateSpecificCulture("ru-RU"))
      car1.LoadDataFromRegionInfo(New RegionInfo("en-US"))
      
      car1.CultureEnglishName = "Russian (United States)"
      car1.CultureNativeName = "русский (США)"
      car1.CurrencyNativeName = "Доллар (США)"
      car1.RegionNativeName = "США"

      ' Register the culture.
      Try
         car1.Register()
      Catch e As InvalidOperationException
         ' Swallow the exception: the culture already is registered.
      End Try
      
      ' Use the custom culture.
      Dim ci As CultureInfo = CultureInfo.CreateSpecificCulture("ru-US")
      Thread.CurrentThread.CurrentCulture = ci
      Console.WriteLine("Current Culture: {0}", 
                        Thread.CurrentThread.CurrentCulture.Name)
      Console.WriteLine("Writing System: {0}", 
                        Thread.CurrentThread.CurrentCulture.TextInfo)
   End Sub
End Module
' The example displays the following output:
'     Current Culture: ru-US
'     Writing System: TextInfo - ru-US

설명

이 API에 대한 자세한 내용은 CultureAndRegionInfoBuilder에 대한 추가 API 설명을 참조하세요.

생성자

CultureAndRegionInfoBuilder(String, CultureAndRegionModifiers)

CultureAndRegionInfoBuilder 클래스의 새 인스턴스를 초기화합니다.

속성

AvailableCalendars

CultureAndRegionInfoBuilder 개체에서 지원하는 달력의 배열을 가져오거나 설정합니다.

CompareInfo

문화권에 대한 문자열을 비교하는 방법을 정의하는 CompareInfo 개체를 가져오거나 설정합니다.

ConsoleFallbackUICulture

기본 그래픽 사용자 인터페이스 문화권이 적합하지 않은 경우 콘솔 애플리케이션에 적합한 대체 사용자 인터페이스 문화권을 가져오거나 설정합니다.

CultureEnglishName

영어로 된 문화권 이름을 가져오거나 설정합니다.

CultureName

만들 문화권의 이름을 가져옵니다.

CultureNativeName

문화권 이름을 해당 문화권에서 표시하도록 설정된 서식 및 언어로 가져오거나 설정합니다.

CultureTypes

현재 CultureAndRegionInfoBuilder 개체가 나타내는 문화권을 설명하는 CultureTypes 값을 가져옵니다.

CurrencyEnglishName

현재 CultureAndRegionInfoBuilder 개체가 나타내는 국가/지역에서 사용되는 통화의 이름을 영어로 가져오거나 설정합니다.

CurrencyNativeName

현재 CultureAndRegionInfoBuilder 개체가 나타내는 국가/지역에서 사용되는 통화의 네이티브 이름을 가져오거나 설정합니다.

GeoId

지역, 국가, 도시 또는 위치에 대한 고유 식별 번호를 가져오거나 설정합니다.

GregorianDateTimeFormat

양력으로 날짜 및 시간 형식을 정의하는 DateTimeFormatInfo 개체를 가져오거나 설정합니다.

IetfLanguageTag

RFC 4646 표준, "Tags for the Identification of Languages"에 맞는 형식의 문화권 이름을 가져오거나 설정합니다.

IsMetric

해당 국가/지역의 측정 단위가 미터법인지 여부를 나타내는 값을 가져오거나 설정합니다.

ISOCurrencySymbol

해당 국가/지역과 관련된 세 문자로 된 ISO 4217 통화 기호를 가져오거나 설정합니다.

IsRightToLeft

현재 CultureAndRegionInfoBuilder 개체와 연관된 쓰기 시스템의 기본 텍스트 줄 방향을 가져오거나 설정합니다.

KeyboardLayoutId

활성 입력 로캘 식별자를 가져오거나 설정합니다.

LCID

현재 CultureAndRegionInfoBuilder 개체에 대한 문화권 식별자를 가져옵니다.

NumberFormat

숫자, 통화 및 백분율 표시를 위한 문화권 형식을 정의하는 NumberFormatInfo 개체를 가져오거나 설정합니다.

Parent

현재 사용자 지정 문화권의 부모 문화권을 나타내는 CultureInfo 개체를 가져오거나 설정합니다.

RegionEnglishName

해당 국가/지역의 전체 이름을 영어로 가져오거나 설정합니다.

RegionName

현재 CultureAndRegionInfoBuilder 개체에 대한 국가/지역의 이름을 가져옵니다.

RegionNativeName

이 사용자 지정 문화권에서 사용하는 국가/지역의 전체 이름을 가져오거나 설정합니다.

TextInfo

이 사용자 지정 문화권과 연관된 쓰기 시스템을 정의하는 TextInfo 개체를 가져오거나 설정합니다.

ThreeLetterISOLanguageName

이 사용자 지정 문화권의 언어를 나타내는 세 문자로 된 ISO 639-2 코드를 가져오거나 설정합니다.

ThreeLetterISORegionName

해당 국가/지역에 대해 ISO 3166에 정의되어 있는 세 문자로 된 코드를 가져오거나 설정합니다.

ThreeLetterWindowsLanguageName

Windows API에 정의된 해당 언어를 나타내는 세 문자로 된 코드를 가져오거나 설정합니다.

ThreeLetterWindowsRegionName

현재 사용자 지정 문화권이 나타내는 국가/지역에 대해 Windows에서 할당한 세 문자로 된 코드를 가져오거나 설정합니다.

TwoLetterISOLanguageName

현재 CultureInfo 개체의 언어를 나타내는 두 문자로 된 ISO 639-1 코드를 가져오거나 설정합니다.

TwoLetterISORegionName

해당 국가/지역에 대해 ISO 3166에 정의되어 있는 두 문자로 된 코드를 가져오거나 설정합니다.

메서드

CreateFromLdml(String)

CultureAndRegionInfoBuilder 개체의 표현이 들어 있는 지정된 XML 파일에서 해당 개체를 다시 구성합니다.

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
LoadDataFromCultureInfo(CultureInfo)

현재 CultureAndRegionInfoBuilder 개체의 속성을 지정된 CultureInfo 개체의 해당 속성으로 설정합니다.

LoadDataFromRegionInfo(RegionInfo)

현재 CultureAndRegionInfoBuilder 개체의 속성을 지정된 RegionInfo 개체의 해당 속성으로 설정합니다.

MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
Register()

현재 CultureAndRegionInfoBuilder 개체를 로컬 컴퓨터의 사용자 지정 문화권으로 유지하고 애플리케이션에서 해당 문화권을 사용할 수 있도록 합니다. 관리 권한이 필요합니다.

Save(String)

현재 CultureAndRegionInfoBuilder 개체의 XML 표현을 지정된 파일에 씁니다.

ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)
Unregister(String)

사용자 지정 문화권을 로컬 컴퓨터에서 삭제합니다.

적용 대상