Export (0) Print
Expand All

CultureInfo.GetCultureInfoByIetfLanguageTag Method

Deprecated. Retrieves a read-only CultureInfo object having linguistic characteristics that are identified by the specified RFC 4646 language tag.

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

public static CultureInfo GetCultureInfoByIetfLanguageTag(
	string name
)

Parameters

name
Type: System.String

The name of a language as specified by the RFC 4646 standard.

Return Value

Type: System.Globalization.CultureInfo
A read-only CultureInfo object.

ExceptionCondition
ArgumentNullException

name is null.

CultureNotFoundException

name does not correspond to a supported culture.

NoteNote

This method and the IetfLanguageTag property are deprecated. Instead of using these elements, the application should use a new CultureInfo object and calls to the Name property. IETF tags and names are identical.

The RFC 4646 standard that is maintained by the Internet Engineering Task Force (IETF) defines an IETF language tag, which provides a uniform means of identifying a language. The format of an IETF language tag is the same as the culture name returned by the Name property, but does not identify a culture uniquely. Different cultures share the same IETF language tag if those cultures have identical linguistic characteristics. The linguistic characteristics of a culture are contained in the TextInfo object associated with a CultureInfo object.

An IETF language tag consists of a mandatory language identifier, an optional script identifier, and an optional region identifier.

Your applications should use the retrieved culture to control language-specific tasks, such as managing a spelling or grammar checker. Applications should not use the retrieved culture to control culture-specific tasks, such as sorting text or formatting times and dates.

For more information, see RFC 4646, "Tags for Identifying Languages," and the most recent draft standard, Draft-phillips-langtags-05.txt, at http://go.microsoft.com/fwlink/?LinkId=100231.

Notes to Callers

The .NET Framework 3.5 and earlier versions throw an ArgumentException if name does not correspond to the name of a supported culture. Starting with the .NET Framework 4, this method throws a CultureNotFoundException.

.NET Framework

Supported in: 4.6, 4.5, 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