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
codestringThe ISO 639-1 code, for example "tr".
namestringThe 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
Name
Gets the English name.
public string Name { get; }
Property Value
NumberSpeller
Gets the speller that writes numbers in words, or null if the language has none.
public INumberSpeller? NumberSpeller { get; init; }
Property Value
TextRules
Gets the casing and sorting rules, or null if the language has none.
public ITextRules? TextRules { get; init; }
Property Value
Methods
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.