Export (0) Print
Expand All

CultureAndRegionInfoBuilder.IetfLanguageTag Property

Gets or sets a culture name formatted according to the RFC 4646 standard, "Tags for the Identification of Languages."

Namespace:  System.Globalization
Assembly:  sysglobl (in sysglobl.dll)

public string IetfLanguageTag { get; set; }

Property Value

Type: System.String
A culture name formatted according to RFC 4646.

ExceptionCondition
ArgumentNullException

In a set operation, the value is null.

ArgumentOutOfRangeException

In a set operation, the length of the value is not from 1 through 84 characters.

ArgumentException

In a set operation, a component of the name specified in the value is empty or longer than 8 characters, not an alphanumeric character or hyphen (-), or the name contains a leading or trailing hyphen.

The IetfLanguageTag property gets or sets a culture name formatted according to RFC 4646, which can be different from the culture name returned by the Name property. For example, in the .NET Framework version 1.0, the neutral culture name for Traditional Chinese was "zh-CHT". In contrast, RFC 4646 defines that culture name as "zh-HANT". (Note that in the .NET Framework version 4, the Display Name for "zh-CHT" is "Chinese (Traditional) Legacy".)

An RFC 4646 culture name consists of several components. A typical culture name consists of a mandatory language identifier, an optional script identifier, and an optional country/region identifier. For example, a valid RFC 4646 culture name for the Serbian language, the Cyrillic script, and the region of Serbia is "sr-Cyrl-RS".

Note that two or more cultures can have the same IETF language tag.

For more information, see RFC 4646, "Tags for the Identification of Languages," at Request For Comments.

.NET Framework

Supported in: 4.5.3, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft