CultureInfo.EnglishName 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取格式为 languagefull [country/regionfull] 的英语区域性名称。
public:
virtual property System::String ^ EnglishName { System::String ^ get(); };
public virtual string EnglishName { get; }
member this.EnglishName : string
Public Overridable ReadOnly Property EnglishName As String
属性值
格式为 languagefull [country/regionfull] 的英语区域性名称,其中 languagefull 是语言的全名, country/regionfull 是国家/地区的全名。
示例
下面的代码示例显示非特定区域性的多个属性。
注意
该示例分别显示具有0x0004和zh-CHT
0x7C04区域性标识符的旧zh-CHS
名称和区域性名称。 但是,Windows Vista 应用程序应使用 zh-Hans
名称而不是 zh-CHS
zh-Hant
zh-CHT。 zh-Hans
和 zh-Hant
名称表示当前标准,除非有使用旧名称的原因,否则应使用 。
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
注解
例如,EnglishName特定区域性名称 en-US 的 是“英语 (美国) ”。
无论.NET Framework的语言版本如何,此属性的值都是相同的。