Class LocalizedString
The string container that supports using localized text.
Inheritance
Implements
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
public sealed class LocalizedString : Object, IEquatable<LocalizedString>, IEquatable<string>, IComparable, IComparable<LocalizedString>, IComparable<string>
Constructors
LocalizedString()
LocalizedString(String)
Initializes a new instance of the LocalizedString class.
Declaration
public LocalizedString(string value)
Parameters
System.String
value
The value. |
Fields
Empty
Empty string without localization.
Declaration
public static readonly LocalizedString Empty
Field Value
LocalizedString
|
Id
The localized string identifier. Used to lookup text value for a current language (via GetString(String, String)).
Declaration
public string Id
Field Value
System.String
|
Value
The overriden string value to use. If empty, the localized string will be used.
Declaration
public string Value
Field Value
System.String
|
Methods
CompareTo(LocalizedString)
Declaration
public int CompareTo(LocalizedString other)
Parameters
LocalizedString
other
|
Returns
System.Int32
|
CompareTo(Object)
Declaration
public int CompareTo(object obj)
Parameters
System.Object
obj
|
Returns
System.Int32
|
CompareTo(String)
Declaration
public int CompareTo(string other)
Parameters
System.String
other
|
Returns
System.Int32
|
Equals(LocalizedString)
Declaration
public bool Equals(LocalizedString other)
Parameters
LocalizedString
other
|
Returns
System.Boolean
|
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
System.Object
obj
|
Returns
System.Boolean
|
Equals(String)
Declaration
public bool Equals(string other)
Parameters
System.String
other
|
Returns
System.Boolean
|
GetHashCode()
Declaration
public override int GetHashCode()
Returns
System.Int32
|
ToString()
Declaration
public override string ToString()
Returns
System.String
|
ToStringPlural(Int32)
Gets the localized plural string for the current language by using string id lookup.
Declaration
public string ToStringPlural(int n)
Parameters
System.Int32
n
The value count for plural message selection. |
Returns
System.String
The localized text. |
Operators
Equality(LocalizedString, LocalizedString)
Compares two localized strings.
Declaration
public static bool operator ==(LocalizedString left, LocalizedString right)
Parameters
LocalizedString
left
The lft string. |
LocalizedString
right
The right string. |
Returns
System.Boolean
True if both values are equal, otherwise false. |
Implicit(LocalizedString to String)
Implicit converter of LocalizedString into System.String.
Declaration
public static implicit operator string (LocalizedString str)
Parameters
LocalizedString
str
The localized string. |
Returns
System.String
The string. |
Implicit(String to LocalizedString)
Implicit converter of System.String into LocalizedString.
Declaration
public static implicit operator LocalizedString(string str)
Parameters
System.String
str
The string. |
Returns
LocalizedString
The localized string. |
Inequality(LocalizedString, LocalizedString)
Compares two localized strings.
Declaration
public static bool operator !=(LocalizedString left, LocalizedString right)
Parameters
LocalizedString
left
The lft string. |
LocalizedString
right
The right string. |
Returns
System.Boolean
True if both values are not equal, otherwise false. |