Show / Hide Table of Contents

Class LanguageTag

Provides methods for working with BCP 47 language tags.

Inheritance
object
LanguageTag
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: VDS.RDF.Parsing
Assembly: dotNetRdf.dll
Syntax
public class LanguageTag

Fields

| Edit this page View Source

IrregularGrandfatheredTags

Tags that do not match the general langtag production and which would not otherwise be considered well-formed, but which are valid although deprecated in most cases.

Declaration
public static readonly string[] IrregularGrandfatheredTags
Field Value
Type Description
string[]
| Edit this page View Source

RegularGrandfatheredTags

Tags that do match the general langtag production but their subtags are not semantically valid. These are also considered valid tags although all are deprecated.

Declaration
public static readonly string[] RegularGrandfatheredTags
Field Value
Type Description
string[]

Methods

| Edit this page View Source

IsValidTurtle(string)

Determine if a string is valid against the LANGTAG production in the Turtle 1.1 specification.

Declaration
public static bool IsValidTurtle(string languageTag)
Parameters
Type Name Description
string languageTag

The string to check.

Returns
Type Description
bool

True if languageTag matches the Turtle 1.1 definition of /^[a-zA-Z]+(-[a-zA-Z0-9]+)*$/ .

| Edit this page View Source

IsWellFormed(string)

Determine if a string represents a well-formed language tag.

Declaration
public static bool IsWellFormed(string languageTag)
Parameters
Type Name Description
string languageTag

The string to check.

Returns
Type Description
bool

True if languageTag is a well-formed language or a grandfathered tag that is considered valid.

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Edit this page
  • View Source
In this article
  • Fields
    • IrregularGrandfatheredTags
    • RegularGrandfatheredTags
  • Methods
    • IsValidTurtle(string)
    • IsWellFormed(string)
  • Extension Methods
Back to top Generated by DocFX