Table of Contents

Class Language

Namespace
HeroKit.Globalization
Assembly
HeroKit.dll

A language and its rules. Predefined languages are in Languages.

public sealed class Language
Inheritance
Language
Inherited Members
Extension Methods

Remarks

Create your own instance to support another language: implement the rule interfaces and pass them to the properties.

Constructors

Language(string, string)

A language and its rules. Predefined languages are in Languages.

public Language(string code, string name)

Parameters

code string

The ISO 639-1 code, for example "tr".

name string

The English name, for example "Turkish".

Remarks

Create your own instance to support another language: implement the rule interfaces and pass them to the properties.

Properties

Code

Gets the ISO 639-1 code.

public string Code { get; }

Property Value

string

Name

Gets the English name.

public string Name { get; }

Property Value

string

NumberSpeller

Gets the speller that writes numbers in words, or null if the language has none.

public INumberSpeller? NumberSpeller { get; init; }

Property Value

INumberSpeller

TextRules

Gets the casing and sorting rules, or null if the language has none.

public ITextRules? TextRules { get; init; }

Property Value

ITextRules

Methods

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.