CultureInfo.GetCultureInfoByIetfLanguageTag Method

Note: This method is new in the .NET Framework version 2.0.

Retrieves a read-only CultureInfo object whose linguistic characteristics are identified by the specified RFC 3066(bis) language tag.

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

public static CultureInfo GetCultureInfoByIetfLanguageTag (
	string name
public static CultureInfo GetCultureInfoByIetfLanguageTag (
	String name
public static function GetCultureInfoByIetfLanguageTag (
	name : String
) : CultureInfo



The name of a language as specified by the RFC 3066(bis) standard.

Return Value

A read-only CultureInfo object.

Exception typeCondition


name is a null reference (Nothing in Visual Basic).


name does not correspond to a supported culture.

The RFC 3066(bis) 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 similar to the culture name returned by the Name property, but does not identify a culture uniquely. That is, different cultures can 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. For example, a valid IETF language tag for the Serbian language, the Cyrillic script, and the region of Serbia is "sr-Cyrl-SR".

Use the GetCultureInfoByIetfLanguageTag method to obtain a read-only CultureInfo object whose IetfLanguageTag property matches the name parameter. The culture that is retrieved by the GetCultureInfoByIetfLanguageTag method cannot be predicted if two or more CultureInfo objects have identical IETF language tags, but the retrieved culture will have the linguistic characteristics specified by the IETF language tag. Use the retrieved culture to control language-specific tasks such as managing a spelling or grammar-checker, but not culture-specific tasks such as sorting text or formatting times and dates.

For more information, see RFC 3066(bis), "Tags for the Identification of Languages," and the most recent draft standard, Draft-phillips-langtags-05.txt, at

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

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

.NET Framework

Supported in: 2.0

Community Additions