CultureInfo.GetCultureInfoByIetfLanguageTag Method (String)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

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


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.

Exception Condition

name is null.


name does not correspond to a supported culture.


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

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
Available since 2.0
Return to top