NanoByte.Common  2.6.1
NanoByte.Common.Collections.LocalizableString Class Reference

A string with an associated language that can be XML serialized to an element with an xml:lang tag. More...

Inheritance diagram for NanoByte.Common.Collections.LocalizableString:
NanoByte.Common.ICloneable< LocalizableString >

Public Member Functions

override string ToString ()
 
bool Equals (LocalizableString? other)
 
override bool Equals (object? obj)
 
override int GetHashCode ()
 
LocalizableString Clone ()
 Creates a plain copy of this string. More...
 
- Public Member Functions inherited from NanoByte.Common.ICloneable< LocalizableString >
Clone ()
 Creates a new clone of this instance. More...
 

Static Public Member Functions

static bool operator== (LocalizableString? left, LocalizableString? right)
 
static bool operator!= (LocalizableString? left, LocalizableString? right)
 

Static Public Attributes

static readonly CultureInfo DefaultLanguage = new("en")
 The default language: english with an invariant country. More...
 

Properties

string? Value [get, set]
 The actual string value to store. More...
 
CultureInfo? Language [get, set]
 The language of the Value. More...
 
string?? LanguageString [get, set]
 Used for XML serialization. More...
 

Detailed Description

A string with an associated language that can be XML serialized to an element with an xml:lang tag.

Member Function Documentation

◆ Clone()

LocalizableString NanoByte.Common.Collections.LocalizableString.Clone ( )

Creates a plain copy of this string.

Returns
The cloned string.

Member Data Documentation

◆ DefaultLanguage

readonly CultureInfo NanoByte.Common.Collections.LocalizableString.DefaultLanguage = new("en")
static

The default language: english with an invariant country.

Property Documentation

◆ Language

CultureInfo? NanoByte.Common.Collections.LocalizableString.Language
getset

The language of the Value.

◆ LanguageString

string?? NanoByte.Common.Collections.LocalizableString.LanguageString
getset

Used for XML serialization.

See also
Language

◆ Value

string? NanoByte.Common.Collections.LocalizableString.Value
getset

The actual string value to store.


The documentation for this class was generated from the following file: