다음을 통해 공유


CultureInfo.Name 속성

"<languagecode2>-<country/regioncode2>" 형식으로 culture 이름을 가져옵니다.

네임스페이스: System.Globalization
어셈블리: mscorlib(mscorlib.dll)

구문

‘선언
Public Overridable ReadOnly Property Name As String
‘사용 방법
Dim instance As CultureInfo
Dim value As String

value = instance.Name
public virtual string Name { get; }
public:
virtual property String^ Name {
    String^ get ();
}
/** @property */
public String get_Name ()
public function get Name () : String

속성 값

"<languagecode2>-<country/regioncode2>" 형식으로 표시된 culture 이름입니다. 여기서 <languagecode2>는 ISO 639-1에서 유래한 두 문자의 소문자 코드이고, <country/regioncode2>는 ISO 3166에서 유래한 두 문자의 대문자 코드입니다.

설명

CultureInfo.Name 속성은 "<languagecode2>-<country/regioncode2>" 형식의 RFC 1766 표준을 따릅니다. 여기서 <languagecode2>는 ISO 639-1에서 유래한 두 문자의 소문자 코드이고, <country/regioncode2>는 ISO 3166에서 유래한 두 문자의 대문자 코드입니다. 예를 들어, 미국 영어에 대한 특정 culture의 Name은 "en-US"입니다. 두 문자로 된 코드를 사용할 수 없는 경우 ISO 639-2에서 파생된 세 문자 코드가 사용됩니다. 예를 들어, 세 문자로 된 코드 "div"는 디베히어를 사용하는 culture에 사용됩니다.

culture가 중립 culture이면 해당 Name은 "<languagecode2>" 형식으로 표시됩니다. 예를 들어, 영어에 대한 중립 culture의 Name은 "en"입니다.

미리 정의된 CultureInfo 이름은 CultureInfo 클래스 항목에 나열되어 있습니다.

culture의 전체 이름을 가져오려면 DisplayName, EnglishName 또는 NativeName을 사용합니다.

예제

다음 코드 예제에서는 중립 culture의 여러 가지 속성을 표시합니다.

Imports System
Imports System.Globalization

Public Class SamplesCultureInfo

   Public Shared 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 'Main 

End Class 'SamplesCultureInfo


'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-CHS  zh  zho CHS Chinese (Simplified)                     Chinese (Simplified)
'zh-CHT  zh  zho CHT Chinese (Traditional)                    Chinese (Traditional)
'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
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-CHS  zh  zho CHS Chinese (Simplified)                     Chinese (Simplified)
zh-CHT  zh  zho CHT Chinese (Traditional)                    Chinese (Traditional)
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

*/
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-CHS  zh  zho CHS Chinese (Simplified)                     Chinese (Simplified)
zh-CHT  zh  zho CHT Chinese (Traditional)                    Chinese (Traditional)
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

*/
import System.* ;
import System.Globalization.* ;

public class SamplesCultureInfo
{
     public static void main(String[] args)
    {
        // Displays several properties of the neutral cultures.
        Console.WriteLine("CULTURE ISO ISO WIN DISPLAYNAME                  " 
            + "            ENGLISHNAME");
        
        for (int iCtr = 0; 
            iCtr < (CultureInfo.GetCultures(CultureTypes.NeutralCultures).
            length); iCtr++) {
            CultureInfo ci = 
                CultureInfo.GetCultures(CultureTypes.NeutralCultures)[iCtr];
            Console.Write("{0,-7}", ci.get_Name());
            Console.Write(" {0,-3}", ci.get_TwoLetterISOLanguageName());
            Console.Write(" {0,-3}", ci.get_ThreeLetterISOLanguageName());
            Console.Write(" {0,-3}", ci.get_ThreeLetterWindowsLanguageName());
            Console.Write(" {0,-40}", ci.get_DisplayName());
            Console.WriteLine(" {0,-40}", ci.get_EnglishName());
        }
    } //main 
} //SamplesCultureInfo

/*
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-CHS  zh  zho CHS Chinese (Simplified)                     Chinese 
(Simplified)
zh-CHT  zh  zho CHT Chinese (Traditional)                    Chinese
(Traditional)
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
*/

플랫폼

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework에서 모든 플래폼의 모든 버전을 지원하지는 않습니다. 지원되는 버전의 목록은 시스템 요구 사항을 참조하십시오.

버전 정보

.NET Framework

2.0, 1.1, 1.0에서 지원

.NET Compact Framework

2.0, 1.0에서 지원

참고 항목

참조

CultureInfo 클래스
CultureInfo 멤버
System.Globalization 네임스페이스
CultureInfo.DisplayName 속성
NativeName
CultureInfo.EnglishName 속성
TwoLetterISOLanguageName
ThreeLetterISOLanguageName
ThreeLetterWindowsLanguageName