• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Struct Language

A language identifier (spec §7.9.2). An RFC 3066 language tag string such as "en-US" or "de-DE". Used by the catalog /Lang entry and by tagged-content structure elements.

Implements
IEquatable<Language>
Inherited Members
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetType()
Namespace: DRIT.Pdf
Assembly: DRIT.Pdf.dll
Syntax
public readonly struct Language : IEquatable<Language>

Constructors

Language(string)

Initializes a language from a tag string.

Declaration
public Language(string tag)
Parameters
Type Name Description
string tag

Fields

De

German.

Declaration
public static readonly Language De
Field Value
Type Description
Language

EnGB

English (United Kingdom).

Declaration
public static readonly Language EnGB
Field Value
Type Description
Language

EnUS

English (United States).

Declaration
public static readonly Language EnUS
Field Value
Type Description
Language

Es

Spanish.

Declaration
public static readonly Language Es
Field Value
Type Description
Language

Fr

French.

Declaration
public static readonly Language Fr
Field Value
Type Description
Language

Hu

Hungarian.

Declaration
public static readonly Language Hu
Field Value
Type Description
Language

None

No language specified.

Declaration
public static readonly Language None
Field Value
Type Description
Language

Properties

Tag

The language tag string (e.g. "en-US").

Declaration
public string Tag { get; }
Property Value
Type Description
string

Methods

Equals(Language)

Indicates whether the current object is equal to another object of the same type.

Declaration
public bool Equals(Language other)
Parameters
Type Name Description
Language other

An object to compare with this object.

Returns
Type Description
bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Indicates whether this instance and a specified object are equal.

Declaration
public override bool Equals(object? obj)
Parameters
Type Name Description
object obj

The object to compare with the current instance.

Returns
Type Description
bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

Overrides
ValueType.Equals(object)

GetHashCode()

Returns the hash code for this instance.

Declaration
public override int GetHashCode()
Returns
Type Description
int

A 32-bit signed integer that is the hash code for this instance.

Overrides
ValueType.GetHashCode()

ToString()

Returns the fully qualified type name of this instance.

Declaration
public override string ToString()
Returns
Type Description
string

The fully qualified type name.

Overrides
ValueType.ToString()

TryParse(string?)

Attempts to parse a language tag string.

Declaration
public static Language TryParse(string? tag)
Parameters
Type Name Description
string tag
Returns
Type Description
Language

Operators

operator ==(Language, Language)

Equality operator.

Declaration
public static bool operator ==(Language a, Language b)
Parameters
Type Name Description
Language a
Language b
Returns
Type Description
bool

operator !=(Language, Language)

Inequality operator.

Declaration
public static bool operator !=(Language a, Language b)
Parameters
Type Name Description
Language a
Language b
Returns
Type Description
bool

Implements

IEquatable<T>
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX