次の方法で共有


CultureInfo.ThreeLetterWindowsLanguageName プロパティ

Windows API の定義に従って、言語に対する 3 桁文字コードを取得します。

Public Overridable ReadOnly Property ThreeLetterWindowsLanguageName _
   _
   As String
[C#]
public virtual string ThreeLetterWindowsLanguageName {get;}
[C++]
public: __property virtual String*
   get_ThreeLetterWindowsLanguageName();
[JScript]
public function get ThreeLetterWindowsLanguageName() : String;

プロパティ値

Windows API で定義されている言語に対する 3 桁文字コード。

解説

このプロパティは、 LOCALE_SABBREVLANGNAME フラグを持つ Windows API メソッドの GetLocaleInfo と同じ値を返します。たとえば、Windows API で定義されている英語 (米国) の 3 桁文字コードは、"enu" です。

使用例

[Visual Basic, C#, C++] ニュートラル カルチャのプロパティ値のいくつかを表示するコード例を次に示します。

 
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


[C#] 
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

*/

[C++] 
#using <mscorlib.dll>
using namespace System;
using namespace System::Globalization;

int main()  {

   // Displays several properties of the neutral cultures.
   Console::WriteLine( S"CULTURE ISO ISO WIN DISPLAYNAME                              ENGLISHNAME" );
   System::Collections::IEnumerator* enum0 = CultureInfo::GetCultures(CultureTypes::NeutralCultures)->GetEnumerator();
   while (enum0->MoveNext())
   {
      CultureInfo* ci = __try_cast<CultureInfo*>(enum0->Current);
      Console::Write( S"{0,-7}", ci->Name );
      Console::Write( S" {0,-3}", ci->TwoLetterISOLanguageName );
      Console::Write( S" {0,-3}", ci->ThreeLetterISOLanguageName );
      Console::Write( S" {0,-3}", ci->ThreeLetterWindowsLanguageName );
      Console::Write( S" {0,-40}", ci->DisplayName );
      Console::WriteLine( S" {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

*/

[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン 言語のフィルタ をクリックします。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ, .NET Compact Framework - Windows CE .NET

参照

CultureInfo クラス | CultureInfo メンバ | System.Globalization 名前空間 | Name | DisplayName | NativeName | EnglishName | TwoLetterISOLanguageName | ThreeLetterISOLanguageName