CultureInfo.ThreeLetterISOLanguageName Propiedad

Definición

Obtiene el código de tres letras ISO 639-2 del idioma del objetoCultureInfo actual.

public:
 virtual property System::String ^ ThreeLetterISOLanguageName { System::String ^ get(); };
public virtual string ThreeLetterISOLanguageName { get; }
member this.ThreeLetterISOLanguageName : string
Public Overridable ReadOnly Property ThreeLetterISOLanguageName As String

Valor de propiedad

String

Código de tres letras ISO 639-2 del idioma del objeto CultureInfo actual.

Ejemplos

En el ejemplo de código siguiente se muestran varias propiedades de las referencia culturales neutras.

Nota

En el ejemplo se muestran los nombres de referencia cultural y anteriores con 0x0004 y 0x7C04 de referencia zh-CHS zh-CHT cultural, respectivamente. Sin embargo, las Windows Vista deben usar el nombre en lugar de y el nombre zh-Hans zh-CHS en lugar de zh-Hant zh-CHT. Los nombres y representan el estándar actual y deben usarse a menos que tenga una razón zh-Hans para usar los nombres más zh-Hant antiguos.

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

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

*/
Imports System.Globalization

Module Module1

   Public 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



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

End Module

Comentarios

Por ejemplo, la abreviatura de tres letras para inglés es "eng".

Nota

Al comunicarse entre procesos o conservar datos, normalmente es mejor usar el CultureInfo.Name completo. El uso de solo el lenguaje puede perder contexto y datos.

Se aplica a

Consulte también